/* =========================================================
WORKSPACE DASHBOARD, REPORTS, CALENDAR
========================================================= */

.workspace-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.workspace-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.workspace-page-header h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 800;
}

.workspace-page-header p {
    margin: 6px 0 0;
    color: #a9bfca;
}

.workspace-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.workspace-stat {
    min-height: 128px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 20px;
    background: rgba(255, 255, 255, .05);
    display: flex;
    align-items: center;
    gap: 16px;
}

.dashboard-card-link,
.workspace-stat-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.dashboard-card-link {
    display: block;
}

.workspace-stat-link {
    display: flex;
}

.dashboard-card-link:focus-visible,
.workspace-stat-link:focus-visible {
    outline: 3px solid rgba(79, 209, 208, .55);
    outline-offset: 3px;
}

.workspace-stat-link {
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.workspace-stat-link:hover {
    transform: translateY(-3px);
    border-color: rgba(79, 209, 208, .34);
    background: rgba(79, 209, 208, .09);
    color: inherit;
}

.workspace-modal-content {
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 20px;
    background: #132235;
    color: #fff;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .55);
}

.workspace-stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, #377688, #4fd1d0);
    color: #fff;
    font-size: 24px;
}

.workspace-stat-icon.success {
    background: linear-gradient(135deg, #059669, #34d399);
}

.workspace-stat-icon.warning {
    background: linear-gradient(135deg, #d97706, #fbbf24);
}

.workspace-stat-icon.danger {
    background: linear-gradient(135deg, #dc2626, #fb7185);
}

.workspace-stat span,
.workspace-stat small {
    display: block;
    color: #9fb5bf;
}

.workspace-stat strong {
    display: block;
    margin: 2px 0;
    font-size: 28px;
    line-height: 1.1;
}

.workspace-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.workspace-section-title h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
}

.workspace-section-title span,
.workspace-section-title a {
    color: #9fb5bf;
    font-size: 12px;
}

.workspace-meter-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.workspace-meter span {
    color: #c9dce3;
    text-transform: capitalize;
}

.workspace-meter-track {
    width: 100%;
    height: 9px;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
}

.workspace-meter-fill {
    height: 100%;
    min-width: 6px;
    border-radius: inherit;
    background: linear-gradient(90deg, #377688, #4fd1d0);
}

.workspace-meter-fill.success,
.workspace-meter-fill.low {
    background: linear-gradient(90deg, #059669, #34d399);
}

.workspace-meter-fill.warning,
.workspace-meter-fill.high {
    background: linear-gradient(90deg, #d97706, #fbbf24);
}

.workspace-meter-fill.danger,
.workspace-meter-fill.critical {
    background: linear-gradient(90deg, #dc2626, #fb7185);
}

.workspace-progress-ring {
    margin-top: 22px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    background: rgba(255, 255, 255, .04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.workspace-progress-ring strong {
    font-size: 34px;
}

.workspace-progress-ring span {
    color: #9fb5bf;
}

.workspace-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.workspace-list.compact {
    gap: 8px;
}

.workspace-list-row {
    width: 100%;
    min-height: 72px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 16px;
    background: rgba(255, 255, 255, .035);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
}

.workspace-list-row strong,
.workspace-list-row span {
    display: block;
}

.workspace-list-row span {
    margin-top: 4px;
    color: #9fb5bf;
    overflow-wrap: anywhere;
}

.dashboard-assigned-table {
    margin-bottom: 0;
}

.dashboard-assigned-table th {
    white-space: nowrap;
}

.dashboard-assigned-table td {
    vertical-align: middle;
}

.dashboard-task-update-cell {
    min-width: 260px;
    display: grid;
    grid-template-columns: minmax(110px, 150px) minmax(120px, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.dashboard-task-update-cell .btn {
    white-space: nowrap;
}

.dashboard-assigned-table .task-click-row {
    cursor: pointer;
}

.dashboard-assigned-table .task-click-row:hover td {
    background: rgba(79, 209, 208, .08);
}

.dashboard-task-modal-form {
    display: grid;
    gap: 14px;
}

.dashboard-task-subtasks .project-task-subtask {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, .06);
    cursor: pointer;
}

.dashboard-task-subtasks .project-task-subtask span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.dashboard-task-subtasks .project-task-subtask.done span {
    color: #86efac;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.workspace-row-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.workspace-row-meta small {
    color: #9fb5bf;
}

.activity-log-card {
    display: flex;
    flex-direction: column;
}

.activity-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 10px;
    margin-bottom: 14px;
}

.activity-search {
    position: relative;
    min-width: 0;
}

.activity-search i {
    position: absolute;
    left: 15px;
    top: 50%;
    z-index: 2;
    color: #9fb5bf;
    transform: translateY(-50%);
}

.activity-search .form-control {
    padding-left: 44px;
}

.activity-filter-toggle {
    position: relative;
    width: 46px;
    min-width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 14px;
    background: rgba(255, 255, 255, .05);
    color: #d8fbfb;
    transition: .2s ease;
}

.activity-filter-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid #132235;
    border-radius: 999px;
    background: #4fd1d0;
    color: #08202a;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
}

.activity-filter-toggle.has-filters:not(.active) {
    border-color: rgba(79, 209, 208, .35);
    color: #9bf6f4;
}

.activity-filter-toggle:hover,
.activity-filter-toggle.active {
    border-color: rgba(79, 209, 208, .45);
    background: rgba(79, 209, 208, .14);
    color: #fff;
}

.activity-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 14px;
    background: rgba(255, 255, 255, .035);
}

.activity-filter-wide {
    grid-column: 1 / -1;
}

.activity-filter-grid .form-label {
    margin-bottom: 5px;
    color: #9fb5bf;
    font-size: 12px;
    font-weight: 700;
}

.activity-clear-button {
    align-self: end;
    min-height: 42px;
}

.activity-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(79, 209, 208, .08), rgba(255, 255, 255, .025)),
        rgba(255, 255, 255, .035);
}

.activity-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(79, 209, 208, .16);
    color: #8ef1ee;
}

.activity-icon.create {
    background: rgba(34, 197, 94, .15);
    color: #86efac;
}

.activity-icon.delete {
    background: rgba(248, 113, 113, .15);
    color: #fca5a5;
}

.activity-icon.status,
.activity-icon.update {
    background: rgba(251, 191, 36, .15);
    color: #fde68a;
}

.activity-icon.chat {
    background: rgba(96, 165, 250, .15);
    color: #bfdbfe;
}

.activity-content {
    min-width: 0;
}

.activity-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.activity-line strong {
    min-width: 0;
    color: #f8fbfc;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.activity-content p {
    margin: 7px 0 10px;
    color: #c9dce3;
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.activity-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #8faab5;
    font-size: 12px;
}

