.review-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    color: #4285f4;
    padding: 13px 22px;
    border-radius: 999px;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.2s ease;
    border: 1px solid #bfdbfe;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(66, 133, 244, 0.08);
}

.review-button:hover {
    background: #4285F4;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(66, 133, 244, 0.2);
}
/* External Wrap Jobs Page Styling */


h4 {
    color: #0f172a;
    font-weight: 800;
    margin-bottom: 22px;
    padding: 20px 0 18px;
    border-bottom: 1px solid #dbe7f3;
    text-align: center;
    font-size: 1.95rem;
    letter-spacing: -0.02em;
}

/* Button Container */
.btn-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
    padding: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #dbe7f3;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    align-items: stretch;
}

.btn-container a,
.btn-container button {
    padding: 13px 20px;
    font-weight: 700;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0;
    flex-grow: 0;
    flex-shrink: 0;
    min-height: 48px;
}

.admin-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #dbe7f3;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    margin-bottom: 22px;
    overflow: hidden;
}

.admin-panel summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fbff 100%);
}

.admin-panel[open] summary {
    border-bottom: 1px solid #dbe7f3;
}

.admin-panel summary::-webkit-details-marker {
    display: none;
}

.admin-panel summary span {
    color: #0f172a;
    font-weight: 700;
    font-size: 1rem;
}

.admin-panel summary small {
    color: #64748b;
    font-size: 0.88rem;
}

.admin-panel-head {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fbff 100%);
    border-bottom: 1px solid #dbe7f3;
}

.admin-panel-head span {
    color: #0f172a;
    font-weight: 700;
    font-size: 1rem;
}

.admin-panel-head small {
    color: #64748b;
    font-size: 0.88rem;
}

.admin-panel-body {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px 20px 20px;
}

.admin-panel-link {
    min-width: 220px;
}

/* Filter Container */
.filter-container {
    display: flex;
    justify-content: center;
    padding: 6px 0 0;
    margin-bottom: 18px;
}

.filter-container .form-group {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid #dbe7f3;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
    text-align: left;
    width: 100%;
    max-width: 560px;
    margin-bottom: 0;
}

.filter-container label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
}

#categoryFilter {
    font-weight: 700;
    border-width: 1px;
    border-color: #cbd5e1;
    box-shadow: none;
}


/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #1f6391);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #138496, #0f6674);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    transform: translateY(-2px);
}

.google-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.flow-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin: 20px 0 28px;
}

.flow-overview-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #dbe7f3;
    border-radius: 18px;
    padding: 18px 18px 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    min-height: 140px;
}

.flow-overview-card span,
.flow-overview-card small {
    display: block;
}

.flow-overview-card span {
    color: #475569;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.flow-overview-card strong {
    display: block;
    margin: 12px 0 8px;
    color: #0f172a;
    font-size: 2rem;
    line-height: 1;
}

.flow-overview-card small {
    color: #64748b;
    font-size: 0.85rem;
}

.flow-badge {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    min-width: 145px;
    padding: 12px 14px;
    border-radius: 14px;
    text-align: left;
    border: 1px solid transparent;
}

.flow-badge-label {
    font-weight: 700;
    font-size: 0.95rem;
}

.flow-badge small {
    color: inherit;
    opacity: 0.85;
    line-height: 1.3;
}

.flow-intake {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
}

.flow-ready {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.flow-onsite {
    background: #ecfdf5;
    border-color: #86efac;
    color: #15803d;
}

.flow-closing {
    background: #faf5ff;
    border-color: #d8b4fe;
    color: #7e22ce;
}

.flow-completed {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.client-card,
.project-card,
.schedule-card,
.workspace-actions,
.team-stack,
.action-stack,
.progress-cell {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.client-card strong,
.project-card strong {
    color: #0f172a;
    font-size: 0.96rem;
}

.client-card small,
.project-card small,
.project-card p,
.schedule-card label span,
.progress-cell small,
.workflow-muted {
    color: #64748b;
}

.project-card p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.4;
}

.project-card .muted {
    font-style: italic;
}

.team-stack,
.workspace-actions,
.action-stack {
    width: 100%;
}

.team-stack .btn,
.workspace-actions .btn,
.action-stack .btn {
    width: 100%;
    margin: 0;
}

.workspace-actions {
    gap: 10px;
}

.workspace-message-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    color: #4338ca;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-transform: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.workspace-message-badge-alert {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-color: #fdba74;
    color: #c2410c;
}

.schedule-card label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    margin: 0;
}

.schedule-card input {
    width: 100%;
}

.progress-chip {
    min-width: 72px;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 700;
    text-align: center;
}

.sort-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.sort-drag-handle {
    width: 34px;
    height: 34px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.reorder-column {
    width: 56px;
    text-align: center;
}

.sort-drag-handle:hover {
    border-color: #93c5fd;
    color: #1d4ed8;
}

.sort-drag-handle:active {
    cursor: grabbing;
}

.sort-order-pill {
    min-width: 38px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 0.8rem;
    font-weight: 800;
    text-align: center;
}

#example tbody tr.dragging-row {
    opacity: 0.45;
}

#example tbody tr.drag-over-row {
    box-shadow: inset 0 3px 0 #38bdf8;
}

.progress-risk {
    background: #fef2f2;
    color: #b91c1c;
}

.progress-active {
    background: #fff7ed;
    color: #c2410c;
}

.progress-healthy {
    background: #eff6ff;
    color: #1d4ed8;
}

.progress-complete {
    background: #ecfdf5;
    color: #15803d;
}

.workspace-modal-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
    grid-template-areas:
        "summary phase"
        "notes files";
    gap: 22px;
    align-items: start;
}

.workspace-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.workspace-panel-primary {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.workspace-panel-summary {
    grid-area: summary;
}

.workspace-panel-phase {
    grid-area: phase;
}

.workspace-panel-notes {
    grid-area: notes;
}

.workspace-panel-files {
    grid-area: files;
}

.workspace-project-overview {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5edf5;
}

.workspace-purpose-copy {
    margin: -6px 0 18px;
    color: #475569;
    font-size: 0.93rem;
    line-height: 1.55;
}

.workspace-kicker {
    display: block;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.workspace-heading {
    color: #0f172a;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.15;
}

.workspace-subheading {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.45;
}

.workspace-flow-pill {
    background: #e0f2fe;
    color: #075985;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.workspace-client-card {
    display: grid;
    gap: 12px;
    margin-bottom: 22px;
    padding: 18px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
}

.workspace-client-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eef2f7;
}

.workspace-client-name {
    margin: 6px 0 0;
    color: #0f172a;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.2;
}

.workspace-client-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 700;
    font-size: 0.82rem;
    white-space: nowrap;
}

.workspace-client-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.workspace-health-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.workspace-journey-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0 20px;
}

.workspace-journey-card {
    position: relative;
    padding: 14px 14px 13px;
    border-radius: 18px;
    border: 1px solid #dbe7f3;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.workspace-journey-card.is-current {
    border-color: #60a5fa;
    background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.14), 0 14px 28px rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
}

.workspace-journey-card.is-complete {
    border-color: #86efac;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}

.workspace-journey-step {
    display: block;
}

.workspace-journey-step {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.workspace-journey-card strong {
    display: block;
    margin: 8px 0 0;
    color: #0f172a;
    font-size: 0.95rem;
    line-height: 1.3;
}

.workspace-health-card {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 14px 15px 13px;
}

.workspace-health-card span,
.workspace-health-card small {
    display: block;
}

.workspace-health-card span {
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.workspace-health-card strong {
    color: #0f172a;
    font-size: 0.98rem;
    margin: 6px 0 4px;
    display: block;
    line-height: 1.25;
}

.workspace-health-card small {
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.4;
}

.workspace-client-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.85fr);
    gap: 14px;
    margin-bottom: 22px;
}

.workspace-client-card-primary {
    margin-bottom: 0;
}

.workspace-client-summary {
    margin: 8px 0 0;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.5;
}

.workspace-client-badge-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.workspace-client-badge-muted {
    background: #f1f5f9;
    color: #334155;
}

.workspace-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.workspace-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
}

.workspace-detail-item span {
    color: #334155;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.workspace-detail-item strong {
    color: #0f172a;
    line-height: 1.45;
    font-size: 0.95rem;
}

.workspace-detail-item-wide {
    grid-column: 1 / -1;
}

.workspace-support-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: linear-gradient(180deg, #f8fbff 0%, #f1f5f9 100%);
}

.workspace-support-card-compact {
    align-content: start;
}

.workspace-form-section {
    border-top: 1px solid #e2e8f0;
    padding-top: 18px;
    margin-top: 18px;
}

.workspace-form-section-compact {
    border-top: 0;
    margin-top: 0;
    padding-top: 14px;
}

.workspace-inline-accordion {
    margin-top: 18px;
    border-top: 1px solid #e2e8f0;
    padding-top: 18px;
}

.workspace-project-record .workspace-form-section {
    border-top: 0;
    margin-top: 14px;
    padding-top: 0;
}

.workspace-inline-accordion-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.workspace-inline-accordion-summary::-webkit-details-marker {
    display: none;
}

.workspace-inline-accordion-summary::after {
    content: "";
    width: 10px;
    height: 10px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    margin-right: 4px;
}

.workspace-inline-accordion[open] .workspace-inline-accordion-summary::after {
    transform: rotate(225deg);
    margin-top: 6px;
}

.workspace-inline-accordion-summary strong {
    display: block;
    color: #0f172a;
    font-size: 0.96rem;
    font-weight: 800;
}

.workspace-inline-accordion-summary small {
    display: block;
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.45;
    margin-top: 4px;
}

.workspace-profile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.workspace-profile-subsection {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.workspace-timeline-grid {
    display: grid;
    gap: 16px;
}

.workspace-timeline-stage {
    position: relative;
    border: 1px solid #dbe7f3;
    border-radius: 22px;
    padding: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.workspace-timeline-stage[open] {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.workspace-timeline-stage.is-current-phase {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.16), 0 16px 32px rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
}

.workspace-timeline-stage-head {
    list-style: none;
    cursor: pointer;
    display: grid;
    gap: 4px;
}

.workspace-timeline-stage-head::-webkit-details-marker {
    display: none;
}

.workspace-timeline-stage-head::after {
    content: "";
    position: absolute;
    right: 22px;
    top: 24px;
    width: 10px;
    height: 10px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.workspace-timeline-stage[open] .workspace-timeline-stage-head {
    margin-bottom: 14px;
}

.workspace-timeline-stage[open] .workspace-timeline-stage-head::after {
    transform: rotate(225deg);
    top: 30px;
}

.workspace-timeline-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.workspace-timeline-stage-head h6 {
    color: #0f172a;
    font-weight: 800;
    font-size: 1rem;
    margin: 0;
}

.workspace-timeline-stage-head p {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.workspace-timeline-stage-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.workspace-timeline-stage-progress,
.workspace-timeline-stage-status {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.workspace-timeline-stage-progress {
    background: #e2e8f0;
    color: #334155;
}

.workspace-timeline-stage-status {
    background: #fef3c7;
    color: #92400e;
}

.workspace-timeline-stage.is-stage-complete .workspace-timeline-stage-status {
    background: #dcfce7;
    color: #166534;
}

.workspace-subsection-head {
    display: grid;
    gap: 4px;
}

.workspace-subsection-head h6 {
    color: #0f172a;
    font-weight: 700;
}

.workspace-subsection-head small {
    color: #64748b;
}

.workspace-milestone-grid .form-group {
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.workspace-milestone-grid {
    margin-bottom: 0;
}

.workspace-timeline-step label::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 8px;
    border-radius: 999px;
    background: #cbd5e1;
    vertical-align: middle;
}

.workspace-timeline-step.is-active-phase-field label::before {
    background: #2563eb;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.workspace-timeline-step.is-complete-step {
    border-color: #86efac;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}

.workspace-timeline-step.is-complete-step label::before {
    background: #16a34a;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.workspace-profile-form-grid .form-group {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.workspace-profile-form-grid .form-group.is-active-phase-field {
    border-color: #60a5fa;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
}

.workspace-field-note {
    display: block;
    margin-top: 8px;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.4;
}

.workspace-section-header {
    margin-bottom: 14px;
}

.workspace-section-header h6 {
    color: #0f172a;
    font-weight: 700;
}

.workspace-section-header small {
    color: #64748b;
}

.workspace-scroll-panel {
    min-height: 260px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 6px;
}

.workspace-state {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    border: 1px solid #dbe4ef;
    background: #fff;
    color: #334155;
}

.workspace-state i {
    flex-shrink: 0;
}

.workspace-state-loading {
    background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
    color: #0f4c81;
}

.workspace-state-empty {
    background: linear-gradient(180deg, #fafcff 0%, #f3f6fb 100%);
}

.workspace-state-error {
    background: linear-gradient(180deg, #fff7f7 0%, #fff1f2 100%);
    border-color: #fecdd3;
    color: #9f1239;
}

.workspace-list {
    display: grid;
    gap: 0.85rem;
}

.workspace-list-item {
    padding: 1rem 1.05rem;
    border-radius: 16px;
    border: 1px solid #dbe4ef;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.workspace-list-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.workspace-list-title {
    margin: 0 0 0.2rem;
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
}

.workspace-list-meta {
    color: #64748b;
}

.workspace-list-copy {
    margin: 0.55rem 0 0;
    white-space: pre-wrap;
    color: #1e293b;
}

.workspace-list-copy-muted {
    color: #64748b;
}

.workspace-message-attachments,
.message-board-attachments {
    margin-top: 12px;
    display: grid;
    gap: 10px;
}

.workspace-message-attachment,
.message-board-attachment {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    max-width: 100%;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 18px;
    background: #ffffff;
    padding: 10px 12px;
    text-decoration: none;
    color: #0f172a;
}

.workspace-message-attachment i,
.message-board-attachment i {
    color: #e11d48;
}

.workspace-message-attachment span,
.message-board-attachment span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.82rem;
    font-weight: 600;
}

.workspace-message-attachment-image,
.message-board-attachment-image {
    display: block;
    width: min(220px, 100%);
    padding: 0;
    overflow: hidden;
}

.workspace-message-attachment-image img,
.message-board-attachment-image img {
    display: block;
    width: 100%;
    max-height: 180px;
    object-fit: cover;
}

.workspace-message-attachment-image span,
.message-board-attachment-image span {
    display: block;
    padding: 10px 12px;
    white-space: normal;
}

.workspace-sync-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.5rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 0.75rem;
    font-weight: 700;
}

.workspace-phase-card {
    background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 16px;
}

.workspace-phase-kicker {
    display: inline-block;
    color: #1d4ed8;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.workspace-phase-card h6 {
    color: #0f172a;
    font-weight: 700;
}

.workspace-phase-card p {
    color: #475569;
    font-size: 0.92rem;
    line-height: 1.45;
}

.workspace-phase-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.workspace-phase-stat {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 12px 14px;
}

.workspace-phase-stat span {
    display: block;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.workspace-phase-stat strong {
    display: block;
    margin-top: 6px;
    color: #0f172a;
    font-size: 0.94rem;
    line-height: 1.35;
}

.workspace-phase-list {
    margin: 0;
    padding-left: 18px;
    color: #334155;
    display: grid;
    gap: 8px;
}

.workspace-phase-list li {
    line-height: 1.45;
}

.workspace-phase-list li.is-complete {
    color: #166534;
}

.workspace-phase-list li.is-pending {
    color: #9a3412;
}

.workspace-phase-progress {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 16px;
}

.workspace-phase-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.workspace-phase-progress-head strong {
    color: #0f172a;
}

.workspace-phase-progress-head span {
    color: #475569;
    font-size: 0.84rem;
    font-weight: 600;
}

.workspace-phase-blockers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.workspace-phase-blockers span {
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.8rem;
}

.workspace-phase-blockers .workspace-phase-blocker-empty {
    background: #ecfdf5;
    border-color: #86efac;
    color: #166534;
}

.workspace-phase-actions {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 16px;
}

.workspace-phase-action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.workspace-phase-hint {
    display: block;
    color: #64748b;
    line-height: 1.4;
}

.workspace-phase-actions-nested {
    margin-top: 14px;
    margin-bottom: 14px;
}

.workspace-section-header-compact {
    margin-bottom: 12px;
}

/* Icons */
.fa, .fas, .far, .fab {
    margin-right: 8px;
}

/* DataTable Styling */
#example {
    background-color: white !important;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 100% !important;
    margin: 20px 0;
}

#example thead {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
}

#example thead th {
    padding: 15px 10px;
    font-weight: 600;
    text-align: center;
    border: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#example tbody tr {
    transition: all 0.3s ease;
}

#example tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#example tbody td {
    padding: 12px 10px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    text-align: left;
}

#example tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

#example tbody tr:nth-child(odd) {
    background-color: white;
}

@media (max-width: 1200px) {
    .workspace-modal-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "summary"
            "phase"
            "notes"
            "files";
    }

    .workspace-journey-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workspace-health-strip,
    .workspace-phase-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workspace-client-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .workspace-health-strip {
        grid-template-columns: 1fr;
    }

    .workspace-phase-meta-grid,
    .workspace-profile-form-grid {
        grid-template-columns: 1fr;
    }

    .workspace-detail-grid {
        grid-template-columns: 1fr;
    }

    .workspace-client-header {
        flex-direction: column;
    }

    .workspace-client-badge-row {
        justify-content: flex-start;
    }

    .workspace-timeline-stage {
        padding: 16px;
    }

    .workspace-journey-strip {
        grid-template-columns: 1fr;
    }
}

/* Board Modal Styling */
.ew-modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}

.ew-modal-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    border-bottom: none;
    padding: 20px 25px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.ew-modal-title {
    font-weight: 600;
    font-size: 1.3rem;
}

.ew-modal-subtitle {
    margin: 6px 0 0;
    color: rgba(255,255,255,0.78);
    font-size: 0.92rem;
    line-height: 1.45;
}

.ew-modal-header > :first-child {
    min-width: 0;
    flex: 1 1 auto;
}

.ew-modal-header [data-modal-close],
.ew-modal-header button[aria-label="Close"] {
    margin-left: auto;
    flex-shrink: 0;
    align-self: flex-start;
}

.ew-modal-body {
    padding: 25px;
    background-color: #f8f9fa;
}

.ew-modal-footer {
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid #e2e8f0;
    padding: 15px 25px;
}

.close {
    color: white;
    opacity: 0.8;
    font-size: 1.5rem;
}

.close:hover {
    color: white;
    opacity: 1;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    display: block;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.ew-input {
    border-color: #d5deea;
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.ew-input:focus {
    border-color: #0f6cbd;
    box-shadow: 0 0 0 3px rgba(15, 108, 189, 0.12);
}

.ew-btn {
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.ew-btn:hover {
    transform: translateY(-1px);
}

.ew-btn-primary {
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.ew-btn-secondary {
    border-color: #cbd5e1;
}

.ew-btn-outline {
    background: #fff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.ew-btn-dark {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}

/* Select Multiple */
select[multiple] {
    min-height: 120px;
}

/* Checkbox Styling */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

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

.checkbox-item label {
    margin: 0;
    cursor: pointer;
    font-weight: normal;
}

/* Status Indicators */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-confirmed {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-completed {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Action Buttons in Table */
.action-btn {
    padding: 6px 12px;
    margin: 2px;
    border-radius: 4px;
    font-size: 0.8rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.action-btn-info {
    background-color: #17a2b8;
    color: white;
}

.action-btn-edit {
    background-color: #ffc107;
    color: #212529;
}

.action-btn-delete {
    background-color: #dc3545;
    color: white;
}

/* Client Details Styling */
#clientDetails {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
}

#clientDetails h6 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 10px;
}

#clientDetails p {
    margin: 5px 0;
    color: #6c757d;
}

/* Result Messages */
#result {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    display: none;
}

#result.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#result.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .btn-container {
        flex-direction: column;
        align-items: center;
    }

    .btn-container a,
    .btn-container button {
        min-width: auto;
        margin-bottom: 10px;
    }

    #example {
        font-size: 0.8rem;
    }

    #example thead th,
    #example tbody td {
        padding: 8px 5px;
    }

    h4 {
        font-size: 1.5rem;
        padding: 15px 0;
    }
}

@media (max-width: 576px) {
    .ew-modal-body {
        padding: 15px;
    }

    .btn-container {
        padding: 15px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Table Cell Content */
.cell-content {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cell-content:hover {
    overflow: visible;
    white-space: normal;
    background-color: rgba(52, 152, 219, 0.1);
    padding: 5px;
    border-radius: 4px;
}

/* Priority Indicators */
.priority-high {
    border-left: 4px solid #e74c3c;
}

.priority-medium {
    border-left: 4px solid #f39c12;
}

.priority-low {
    border-left: 4px solid #27ae60;
}

/* Date Styling */
.date-cell {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #6c757d;
}

.overdue {
    color: #e74c3c;
    font-weight: 600;
}

/* Category Tags */
.category-tag {
    display: inline-block;
    padding: 4px 8px;
    background-color: #e9ecef;
    color: #6c757d;
    border-radius: 12px;
    font-size: 0.75rem;
    margin: 2px;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

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

/* Progress Bar Styling */
.progress-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 25px;
    height: 20px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 25px;
    transition: width 0.5s ease-in-out;
    text-align: center;
    line-height: 20px;
    color: white;
    font-weight: bold;
    background: linear-gradient(90deg, #3498db, #2980b9);
    position: relative;
    overflow: hidden;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.progress-percentage {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: #2c3e50;
    font-size: 0.8rem;
    text-shadow: 1px 1px 1px rgba(255,255,255,0.8);
    z-index: 1;
}

/* Status Container */
#statuses-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 20px 0;
}

#statuses-container div {
    margin: 15px 0;
    padding: 10px;
    border-radius: 8px;
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
}

#statuses-container div:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

/* Progress Circle Styling */
.progress-circle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    height: 120px;
    margin: 20px 0;
}

.progress-circle {
    position: relative;
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    transition: stroke-dasharray 0.8s ease-in-out;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.progress-ring__circle--background {
    stroke: #e0e0e0;
    stroke-width: 8;
    fill: none;
}

.progress-ring__circle--fill {
    stroke: #3498db;
    stroke-width: 8;
    fill: none;
    stroke-dasharray: 0 314; /* Starts at 0% progress */
    stroke-linecap: round;
    transition: stroke-dasharray 0.8s ease-in-out, stroke 0.3s ease;
}

/* Progress circle color variants */
.progress-ring__circle--fill.success {
    stroke: #27ae60;
}

.progress-ring__circle--fill.warning {
    stroke: #f39c12;
}

.progress-ring__circle--fill.danger {
    stroke: #e74c3c;
}

.progress-ring__circle--fill.info {
    stroke: #17a2b8;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    font-size: 18px;
    color: #2c3e50;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
    z-index: 10;
}

.progress-text small {
    display: block;
    font-size: 12px;
    font-weight: normal;
    color: #6c757d;
    margin-top: 2px;
}

/* Progress Bar Color Variants */
.progress-bar.success {
    background: linear-gradient(90deg, #27ae60, #219a52);
}

.progress-bar.warning {
    background: linear-gradient(90deg, #f39c12, #e67e22);
}

.progress-bar.danger {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.progress-bar.info {
    background: linear-gradient(90deg, #17a2b8, #138496);
}

/* Progress Container Variants */
.progress-container.large {
    height: 30px;
}

.progress-container.small {
    height: 15px;
}

.progress-container.large .progress-bar {
    line-height: 30px;
    font-size: 0.9rem;
}

.progress-container.small .progress-bar {
    line-height: 15px;
    font-size: 0.7rem;
}

.progress-container.large .progress-percentage {
    font-size: 0.9rem;
}

.progress-container.small .progress-percentage {
    font-size: 0.7rem;
}

/* Animated Progress Indicators */
.progress-animated {
    position: relative;
    overflow: hidden;
}

.progress-animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
            -45deg,
            rgba(255, 255, 255, 0.2) 25%,
            transparent 25%,
            transparent 50%,
            rgba(255, 255, 255, 0.2) 50%,
            rgba(255, 255, 255, 0.2) 75%,
            transparent 75%,
            transparent
    );
    background-size: 50px 50px;
    animation: move 2s linear infinite;
    border-radius: 25px;
}

@keyframes move {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 50px 50px;
    }
}

/* Progress Status Indicators */
.progress-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 10px 0;
    padding: 10px 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.progress-status:hover {
    background: #f8f9fa;
    border-color: #3498db;
    transform: translateX(3px);
}

.progress-status-label {
    font-weight: 600;
    color: #2c3e50;
    flex: 1;
}

.progress-status-value {
    margin-left: 15px;
    min-width: 200px;
}

/* Mini Progress Circles for Table Cells */
.mini-progress-circle {
    width: 40px;
    height: 40px;
    display: inline-block;
    position: relative;
}

.mini-progress-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.mini-progress-circle .progress-text {
    font-size: 10px;
    font-weight: bold;
}

/* Responsive Progress Elements */
@media (max-width: 768px) {
    .progress-circle {
        width: 100px;
        height: 100px;
    }

    .progress-text {
        font-size: 16px;
    }

    .progress-status {
        flex-direction: column;
        align-items: stretch;
    }

    .progress-status-value {
        margin-left: 0;
        margin-top: 10px;
        min-width: auto;
    }

    .mini-progress-circle {
        width: 35px;
        height: 35px;
    }
}

.form-control {
    display: block;
    width: 100%;
    height: 45px;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

/* Container and Layout Styles */
.container-fluid {
    padding: 0 15px;
    max-width: 100%;
}

.mt-5 {
    margin-top: 3rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

/* Button Styles */
.btn {
    display: inline-block;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    border-radius: 0.375rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-outline-primary {
    color: #0d6efd;
    border-color: #0d6efd;
    background-color: transparent;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-outline-primary:focus {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.5);
}

.btn-outline-primary:active {
    color: #fff;
    background-color: #0a58ca;
    border-color: #0a53be;
}

/* Legend Styles */
#legend {
    margin-bottom: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

#legend span:first-child {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: pink;
    margin-right: 8px;
    border: 1px solid #ccc;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Table Styles */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    vertical-align: top;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    border-top: 1px solid #dee2e6;
    vertical-align: middle;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: rgba(0, 0, 0, 0.05);
}

.table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
    transition: background-color 0.15s ease-in-out;
}

/* Responsive Table */
@media (max-width: 768px) {
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        min-width: 800px;
    }

    .table th,
    .table td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }

    #legend {
        font-size: 0.8rem;
        flex-direction: column;
        align-items: flex-start;
    }

    #legend span:first-child {
        margin-bottom: 5px;
    }
}

/* Loading State (Optional) */
.table tbody.loading {
    opacity: 0.6;
    position: relative;
}

.table tbody.loading::after {
    content: "Loading...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-style: italic;
    color: #6c757d;
}

/* Action Column Styles */
.table td:last-child {
    text-align: center;
    white-space: nowrap;
}

/* Status and Category Column Styles */
.table td:nth-child(5),
.table td:nth-child(6) {
    font-weight: 500;
}

/* Contact Column Styles */
.table td:nth-child(3) {
    word-break: break-word;
}

/* Sort Column Styles */
.table td:nth-child(4) {
    text-align: center;
    font-weight: 500;
}
#datatable thead {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
}

/* DataTable Buttons Styles */
.dt-buttons {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.dt-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid #dee2e6;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    background-color: #fff;
    color: #495057;
    transition: all 0.15s ease-in-out;
    min-height: 38px;
}

.dt-button:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dt-button:focus {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    border-color: #86b7fe;
}

.dt-button:active {
    background-color: #dee2e6;
    border-color: #adb5bd;
    transform: translateY(0);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.125);
}

/* Individual Button Type Styles */
.buttons-copy {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.buttons-copy:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    color: #fff;
}

.buttons-csv {
    background-color: #198754;
    border-color: #198754;
    color: #fff;
}

.buttons-csv:hover {
    background-color: #157347;
    border-color: #146c43;
    color: #fff;
}

.buttons-excel {
    background-color: #20c997;
    border-color: #20c997;
    color: #fff;
}

.buttons-excel:hover {
    background-color: #1aa179;
    border-color: #199473;
    color: #fff;
}

.buttons-pdf {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.buttons-pdf:hover {
    background-color: #bb2d3b;
    border-color: #b02a37;
    color: #fff;
}

.buttons-print {
    background-color: #6f42c1;
    border-color: #6f42c1;
    color: #fff;
}

.buttons-print:hover {
    background-color: #5d3897;
    border-color: #59358b;
    color: #fff;
}

/* Button Icons (if you want to add them later) */
.dt-button span {
    font-weight: 500;
}

/* Responsive Button Layout */
@media (max-width: 576px) {
    .dt-buttons {
        justify-content: center;
        gap: 0.25rem;
    }

    .dt-button {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
        min-height: 32px;
    }
}
/* DataTable Search Styles */
.dt-search {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dt-search label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0;
    white-space: nowrap;
    font-size: 0.95rem;
}

.dt-input {
    display: inline-block;
    width: 100%;
    max-width: 300px;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.dt-input:focus {
    color: #495057;
    background-color: #fff;
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.dt-input:focus::placeholder {
    color: transparent;
}

.dt-input::placeholder {
    color: #6c757d;
    opacity: 1;
}

.dt-input:disabled,
.dt-input[readonly] {
    background-color: #e9ecef;
    opacity: 1;
}

/* Search input with icon style (optional enhancement) */
.dt-search {
    position: relative;
}

.dt-search::after {
    content: "🔍";
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
    font-size: 0.875rem;
    opacity: 0.7;
}

.dt-input:focus + .dt-search::after {
    opacity: 0.9;
}

/* Responsive Search Layout */
@media (max-width: 768px) {

    .dt-search {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 15px;
        margin: 15px;
    }

    .dt-input {
        max-width: 100%;
        min-width: 250px;
    }

    .dt-search label {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .dt-input {
        min-width: 100%;
    }
}
.remove-option{
    margin-left:50px;
}
.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99999!important;
    display: none;
    width: 100%;
    height: 100%;
    overflow: hidden;
    outline: 0;
}

select {
    word-wrap: normal;
    min-height: 35px!important;
}
button, input, optgroup, select, textarea {
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    min-height: 35px!important;
}
#memberModal .ew-modal-title {
    font-size: 1.3rem;
    font-weight: 700;
}

#memberModal .ew-modal-body {
    padding: 1.25rem;
    max-height: calc(100vh - 14rem) !important;
    overflow-y: auto !important;
    flex: 1 1 auto;
}

/* Adjustments for smaller screens (mobile) */
@media (max-width: 767.98px) {
    #memberModal .ew-modal-body {
        max-height: calc(100vh - 11rem) !important;
    }
}
.swal2-container {
    z-index:99999999!important;
}

@media (min-width: 769px) { /* For medium screens and up */
    .btn-container a,
    .btn-container button {
        width: auto !important; /* Ensure they don't take full width */
        display: inline-flex !important; /* Ensure they are inline-flex */
    }
}

/* Additional custom styles for improved UI */
.member-list {
    display: grid;
    gap: 12px;
}

.member-checkbox-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #dbe4ef;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.member-checkbox-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.member-checkbox-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.member-checkbox-input {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
    flex-shrink: 0;
}

.member-checkbox-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.member-checkbox-name {
    color: #0f172a;
    font-weight: 700;
}

.member-checkbox-copy small {
    color: #64748b;
}

#memberModal .ew-modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
}

#memberModal .tw-modal-panel {
    max-height: calc(100vh - 2rem);
}

#memberModal .member-modal-body {
    min-height: 260px;
}

#memberModal .member-list {
    padding-bottom: 8px;
}

#memberModal .ew-modal-footer {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.team-builder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    width: 100%;
}

.team-builder-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #dbe7f3;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.team-builder-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.team-builder-card-head h3 {
    margin: 0 0 4px;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 800;
}

.team-builder-card-head p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.45;
}

.team-builder-members {
    display: grid;
    gap: 10px;
}

.team-builder-actions {
    display: flex;
    justify-content: flex-end;
}

.progress-circle-container {
    min-height: 60px;
}

.btn-container .btn {
    margin-bottom: 0.5rem;
    margin-right: 0.5rem;
}

@media (max-width: 768px) {
    .btn-container .btn {
        width: 100%;
        margin-right: 0;
    }
}

.google-icon {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
}

.table th, .table td {
    vertical-align: middle;
}

.group td {
    background-color: #e9ecef !important;
    font-weight: bold;
}

.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: text-bottom;
    border: 0.125em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}
.pac-container {
    display: block !important;
    z-index: 100000 !important;
}

 .bootstrap-select .dropdown-menu {
          z-index: 10000 !important; /* A high z-index to ensure it appears above the calendar */
      }

body.tw-modal-open {
    overflow: hidden !important;
}

body.modal-open {
    overflow: hidden !important;
}

.tw-modal {
    position: fixed;
    inset: 0;
    z-index: 120000;
    display: none;
}

.tw-modal[hidden] {
    display: none !important;
}

.tw-modal.is-open {
    display: block !important;
}

.tw-modal-panel {
    max-height: calc(100vh - 2rem);
    position: relative;
    z-index: 1;
}

.tw-modal-body {
    max-height: calc(100vh - 12rem);
    overflow-y: auto;
}

.checklist-modal-copy {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
    border: 1px solid #dbe7f3;
    color: #334155;
    line-height: 1.5;
}

.checklist-modal-list {
    display: grid;
    gap: 12px;
}

.checklist-option-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #dbe4ef;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.checklist-option-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.checklist-option-main {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.checklist-option-input {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
    flex-shrink: 0;
}

.checklist-option-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.checklist-option-title {
    color: #0f172a;
    font-weight: 700;
    line-height: 1.35;
}

.checklist-option-copy small {
    color: #64748b;
    line-height: 1.35;
}

.checklist-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid #fecaca;
    background: #fff1f2;
    color: #be123c;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.checklist-remove-btn:hover {
    background: #ffe4e6;
    border-color: #fda4af;
    transform: translateY(-1px);
}

#clientInfoModal .tw-modal-panel {
    width: min(96vw, 1480px);
    max-height: calc(100vh - 1.5rem);
}

#clientInfoModal .tw-modal-body {
    max-height: calc(100vh - 10rem);
    background: linear-gradient(180deg, #f8fbff 0%, #f1f5f9 100%);
}

#clientInfoModal .workspace-panel-phase {
    position: sticky;
    top: 0;
}

@media (max-width: 1200px) {
    #clientInfoModal .workspace-panel-phase {
        position: static;
    }
}

#mainPageTitle {
    padding-top: 30px;
}

.message-board-shell {
    display: grid;
    grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
    gap: 24px;
    margin-top: 18px;
    align-items: start;
}

.message-board-page {
    width: min(1680px, calc(100vw - 48px));
    margin: 0 auto 28px;
}

.message-board-toolbar {
    margin-bottom: 0;
}

.message-board-hero {
    margin-top: 8px;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.9fr);
    gap: 16px;
    align-items: stretch;
}

.message-board-hero-copy,
.message-board-hero-stats {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 30px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.message-board-hero-copy {
    padding: 18px 22px;
    background: linear-gradient(135deg, #0f766e 0%, #115e59 42%, #0f172a 100%);
    color: #fff;
}

.message-board-hero-copy .message-board-kicker {
    color: rgba(255,255,255,0.72);
}

.message-board-hero-copy h1 {
    margin: 8px 0 6px;
    font-size: 1.5rem;
    line-height: 1.05;
    font-weight: 700;
}

.message-board-hero-copy p:last-child {
    margin: 0;
    max-width: 32rem;
    color: rgba(255,255,255,0.82);
    line-height: 1.45;
    font-size: 0.92rem;
}

.message-board-hero-stats {
    padding: 12px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(247,250,249,0.98) 100%);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.message-board-stat-card {
    border: 1px solid rgba(203, 213, 225, 0.88);
    border-radius: 24px;
    background: #fff;
    padding: 12px 14px;
}

.message-board-stat-card span,
.message-board-stat-card strong,
.message-board-stat-card small {
    display: block;
}

.message-board-stat-card span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.message-board-stat-card strong {
    margin-top: 8px;
    color: #0f172a;
    font-size: 1.35rem;
    line-height: 1;
}

.message-board-stat-card small {
    margin-top: 6px;
    color: #64748b;
    line-height: 1.45;
}

.message-board-sidebar,
.message-board-panel {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 30px;
    background: linear-gradient(180deg, #ffffff 0%, #f7faf9 100%);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.message-board-sidebar {
    padding: 16px;
    position: sticky;
    top: 112px;
    background:
        linear-gradient(180deg, rgba(240, 253, 250, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%),
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.08), transparent 34%);
}

.message-board-sidebar-head,
.message-board-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.message-board-kicker {
    margin: 0;
    color: #0f766e;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.message-board-sidebar-copy {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.45;
}

.message-board-sidebar-head h2,
.message-board-header h2 {
    margin: 6px 0 0;
    font-size: 1.45rem;
    color: #0f172a;
}

.message-board-search {
    margin-top: 16px;
}

.message-board-search-shell {
    position: relative;
}

.message-board-search-shell .ew-input {
    padding-right: 106px;
}

.message-board-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 999px;
    background: #ffffff;
    color: #475569;
    font-size: 0.76rem;
    font-weight: 700;
}

.message-board-search-clear.hidden {
    display: none;
}

.message-board-filter-bar {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.message-board-thread-caption {
    margin-top: 12px;
    color: #64748b;
    font-size: 0.83rem;
    line-height: 1.4;
}

.message-board-sidebar-footer {
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 4px 0;
    color: #64748b;
    font-size: 0.75rem;
}

.message-board-sidebar-live {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 700;
}

.message-board-sidebar-live i {
    color: #10b981;
    font-size: 0.52rem;
}

.message-board-sidebar-refresh {
    text-align: right;
}

.message-board-sidebar-stats {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.message-board-sidebar-stat {
    border: 1px solid rgba(203, 213, 225, 0.88);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    padding: 12px 14px;
}

.message-board-sidebar-stat span,
.message-board-sidebar-stat strong {
    display: block;
}

.message-board-sidebar-stat span {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.message-board-sidebar-stat strong {
    margin-top: 8px;
    color: #0f172a;
    font-size: 1.25rem;
    line-height: 1;
}

.message-board-filter-chip {
    border: 1px solid #dbe7f3;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 10px 14px;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.message-board-filter-chip:hover,
.message-board-filter-chip.is-active {
    border-color: #34d399;
    background: #ecfdf5;
    color: #047857;
}

.message-board-thread-list {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: calc(100vh - 250px);
    overflow: auto;
    padding-right: 4px;
}

.message-board-thread-section + .message-board-thread-section {
    margin-top: 10px;
}

.message-board-thread-section-head {
    margin-bottom: 10px;
    padding: 0 4px;
}

.message-board-thread-section-head strong,
.message-board-thread-section-head small {
    display: block;
}

.message-board-thread-section-head strong {
    color: #0f172a;
    font-size: 0.88rem;
    font-weight: 800;
}

.message-board-thread-section-head small {
    margin-top: 2px;
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.4;
}

.message-board-thread-section-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message-board-thread-item {
    width: 100%;
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 14px 14px 13px;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    position: relative;
}

.message-board-thread-item:hover,
.message-board-thread-item.is-active {
    border-color: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12);
    transform: translateY(-1px);
}

.message-board-thread-item.is-active::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 14px;
    bottom: 14px;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, #34d399 0%, #14b8a6 100%);
}

.message-board-thread-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.message-board-thread-identity {
    display: flex;
    gap: 10px;
    min-width: 0;
}

.message-board-thread-avatar,
.message-board-client-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    flex-shrink: 0;
    box-shadow: 0 10px 18px rgba(15, 118, 110, 0.18);
}

.message-board-thread-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.message-board-thread-head strong,
.message-board-thread-head small,
.message-board-thread-item p,
.message-board-thread-time {
    display: block;
}

.message-board-thread-head strong {
    color: #0f172a;
    font-size: 0.95rem;
    line-height: 1.3;
}

.message-board-thread-head small,
.message-board-thread-time {
    color: #64748b;
    font-size: 0.76rem;
}

.message-board-thread-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.message-board-thread-status.is-alert {
    background: #fef3c7;
    color: #92400e;
}

.message-board-thread-status.is-open {
    background: #dcfce7;
    color: #166534;
}

.message-board-thread-meta-row {
    margin-top: 6px;
    color: #64748b;
    font-size: 0.78rem;
}

.message-board-thread-badges {
    margin-top: 9px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.message-board-thread-item p {
    margin: 10px 0 0;
    color: #475569;
    font-size: 0.84rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.message-board-panel {
    min-height: 70vh;
    padding: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.08), transparent 28%),
        linear-gradient(180deg, #f6fffb 0%, #ffffff 100%);
}

.message-board-empty {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    color: #64748b;
}

.message-board-empty i {
    font-size: 2rem;
    color: #0f172a;
}

.message-board-active {
    display: flex;
    flex-direction: column;
    min-height: 70vh;
    min-width: 0;
}

.message-board-header {
    padding: 20px 22px 16px;
    border-bottom: 1px solid rgba(203, 213, 225, 0.8);
    background: linear-gradient(180deg, rgba(255,255,255,0.94) 0%, rgba(248, 250, 252, 0.9) 100%);
    backdrop-filter: blur(10px);
}

.message-board-header-main {
    min-width: 0;
}

.message-board-header-client {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.message-board-header-client-copy {
    min-width: 0;
}

.message-board-subtitle {
    margin: 6px 0 0;
    color: #475569;
    line-height: 1.5;
}

.message-board-header-badges {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.message-board-header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.message-board-header-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.message-board-header-link i {
    font-size: 0.9rem;
}

.message-board-header-link:hover {
    transform: translateY(-1px);
}

.message-board-header-link-secondary {
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(255,255,255,0.92);
    color: #0f172a;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.message-board-header-link-secondary:hover {
    border-color: rgba(52, 211, 153, 0.45);
    background: #ffffff;
    color: #047857;
}

.message-board-header-link-primary {
    border: 1px solid rgba(15, 118, 110, 0.3);
    background: linear-gradient(135deg, #10b981 0%, #0f766e 100%);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.2);
}

.message-board-header-link-primary:hover {
    color: #ffffff;
    box-shadow: 0 16px 28px rgba(15, 118, 110, 0.26);
}

.message-board-project-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 14px 22px 0;
}

.message-board-project-summary-card {
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.86);
    padding: 14px 16px;
}

.message-board-project-summary-card span,
.message-board-project-summary-card strong,
.message-board-project-summary-card small {
    display: block;
}

.message-board-project-summary-card span {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.message-board-project-summary-card strong {
    margin-top: 8px;
    color: #0f172a;
    font-size: 1rem;
}

.message-board-project-summary-card small {
    margin-top: 6px;
    color: #475569;
    font-size: 0.86rem;
    line-height: 1.5;
}

.message-board-messages {
    min-height: 320px;
    max-height: 58vh;
    overflow: auto;
    margin: 14px 22px 0;
    border: 1px solid rgba(203, 213, 225, 0.7);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.74) 0%, rgba(248,250,252,0.82) 100%),
        radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.06), transparent 22%),
        radial-gradient(circle at 80% 0%, rgba(45, 212, 191, 0.06), transparent 20%);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-board-message {
    max-width: 78%;
    border-radius: 22px;
    padding: 13px 15px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    position: relative;
}

.message-board-message.is-client {
    align-self: flex-start;
    background: #ffffff;
    border: 1px solid rgba(203, 213, 225, 0.85);
    border-top-left-radius: 10px;
}

.message-board-message.is-team {
    align-self: flex-end;
    background: linear-gradient(180deg, #dcfce7 0%, #ffffff 100%);
    border: 1px solid rgba(74, 222, 128, 0.5);
    border-top-right-radius: 10px;
}

.message-board-message-head strong,
.message-board-message-head small,
.message-board-message p {
    display: block;
}

.message-board-message-head small {
    margin-top: 4px;
    color: #64748b;
    font-size: 0.82rem;
}

.message-board-message p {
    margin: 10px 0 0;
    color: #1e293b;
    font-size: 0.92rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.message-board-reply {
    margin-top: auto;
    border-top: 1px solid rgba(203, 213, 225, 0.7);
    background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(248,250,252,0.98) 100%);
    padding: 14px 22px 18px;
}

.message-board-reply-head {
    margin-bottom: 10px;
}

.message-board-reply textarea {
    width: 100%;
    min-height: 66px;
    border-radius: 22px;
    border-color: rgba(203, 213, 225, 0.95);
    background: #fff;
    resize: vertical;
}

.message-board-reply-actions {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
}

.message-board-reply-tip {
    margin-right: auto;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.45;
}

#messageBoardSendBtn {
    border-radius: 999px;
    padding-inline: 18px;
    background: linear-gradient(135deg, #10b981 0%, #0f766e 100%);
    border: 0;
    color: #ffffff;
}

#messageBoardSendBtn:hover {
    background: linear-gradient(135deg, #0ea5a4 0%, #0f766e 100%);
    color: #ffffff;
}

#messageBoardSendBtn:focus,
#messageBoardSendBtn:active {
    color: #ffffff;
}

.message-board-upload-card {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px dashed rgba(148, 163, 184, 0.55);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
    padding: 12px 14px;
}

.message-board-upload-copy strong,
.message-board-upload-copy small {
    display: block;
}

.message-board-upload-copy strong {
    color: #0f172a;
    font-size: 0.9rem;
}

.message-board-upload-copy small {
    margin-top: 2px;
    color: #64748b;
    font-size: 0.78rem;
}

.message-board-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 999px;
    background: #ffffff;
    padding: 9px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
}

.message-board-upload-list {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}

.message-board-upload-empty {
    border-radius: 16px;
    background: rgba(255,255,255,0.9);
    padding: 10px 12px;
    color: #64748b;
    font-size: 0.78rem;
}

.message-board-upload-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: 16px;
    background: rgba(255,255,255,0.94);
    padding: 10px 12px;
}

.message-board-upload-item-copy {
    min-width: 0;
}

.message-board-upload-item-copy strong,
.message-board-upload-item-copy small {
    display: block;
}

.message-board-upload-item-copy strong {
    color: #0f172a;
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-board-upload-item-copy small {
    color: #64748b;
    font-size: 0.74rem;
}

@media (max-width: 1100px) {
    .message-board-hero {
        grid-template-columns: 1fr;
    }

    .message-board-hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .message-board-shell {
        grid-template-columns: 1fr;
    }

    .message-board-page {
        width: min(100%, calc(100vw - 32px));
    }

    .message-board-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .message-board-hero-copy h1 {
        font-size: 1.7rem;
    }

    .message-board-hero-stats {
        grid-template-columns: 1fr;
    }

    .message-board-header,
    .message-board-sidebar-head,
    .message-board-project-summary,
    .message-board-sidebar-stats {
        grid-template-columns: 1fr;
        display: grid;
    }

    .message-board-header,
    .message-board-project-summary,
    .message-board-messages,
    .message-board-reply {
        margin-left: 16px;
        margin-right: 16px;
    }

    .message-board-message {
        max-width: 100%;
    }
}
