<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
/* Portal Styles */
:root {
    --portal-primary: <?php echo esc_attr($primary_color); ?>;
    --portal-primary-bg: <?php echo  esc_html( $primary_bg ); ?>;
    --portal-primary-dark: #2B4C6D;
    --portal-primary-light: #C3D7EA;
    --portal-gray-50: #f9fafb;
    --portal-gray-100: #f3f4f6;
    --portal-gray-200: #e5e7eb;
    --portal-gray-300: #d1d5db;
    --portal-gray-400: #9ca3af;
    --portal-gray-500: #6b7280;
    --portal-gray-600: #4b5563;
    --portal-gray-700: #374151;
    --portal-gray-800: #1f2937;
    --portal-gray-900: #111827;
    --portal-success: #059669;
    --portal-danger: #dc2626;
    --portal-warning: #d97706;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.fs-portal {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--portal-gray-50);
    color: var(--portal-gray-900);
    line-height: 1.5;
    min-height: 100vh;
}

.fs-portal-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.fs-portal-header {
    background: #fff;
    border-bottom: 1px solid var(--portal-gray-200);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.fs-portal-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.fs-portal-branding {
    display: flex;
    align-items: center;
    gap: 16px;
}

.fs-portal-logo {
    max-height: 40px;
    width: auto;
}

.fs-portal-business-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--portal-gray-900);
}

.fs-portal-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: var(--portal-gray-500);
    transition: all 0.15s;
}

.fs-portal-back:hover {
    background: var(--portal-gray-100);
    color: var(--portal-gray-700);
}

.fs-portal-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.fs-breadcrumb-client {
    color: var(--portal-gray-500);
}

.fs-breadcrumb-sep {
    color: var(--portal-gray-300);
}

.fs-breadcrumb-project {
    color: var(--portal-gray-900);
    font-weight: 500;
}

.fs-portal-project-dates-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--portal-gray-500);
}

.fs-portal-user {
    font-size: 14px;
    color: var(--portal-gray-600);
    display: flex;
    align-items: center;
    gap: 10px;
}

.fs-portal-client-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
    background: var(--portal-gray-100);
    border: 1px solid var(--portal-gray-200);
}

.fs-portal-welcome {
    font-weight: 500;
}

/* Project Header */
.fs-portal-project-header {
    background: #fff;
    border-bottom: 1px solid var(--portal-gray-200);
    padding: 0 24px;
}

.fs-portal-project-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 0 0;
}

.fs-portal-project-title-section {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.fs-portal-project-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--portal-gray-900);
}

.fs-portal-progress-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #ecfdf5;
    color: var(--portal-success);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* Tabs */
.fs-portal-tabs {
    display: flex;
    gap: 0;
}

.fs-portal-tabs-header {
    border-bottom: 1px solid var(--portal-gray-200);
    padding: 0 !important;
}

.fs-portal-tabs-header .fs-portal-tabs {
    padding: 0 20px;
    min-width: 0;
    flex-shrink: 1;
}

.fs-portal-tabs-header .fs-portal-btn {
    margin-right: 20px;
    flex-shrink: 0;
}

.fs-portal-tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--portal-gray-500);
    text-decoration: none;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    cursor: pointer;
}

.fs-portal-tab:hover {
    color: var(--portal-gray-700);
}

.fs-portal-tab.active {
    color: var(--portal-gray-900);
    border-bottom-color: var(--portal-primary);
}

.fs-portal-tab .fs-count-badge {
    margin-left: 6px;
}

.fs-portal-tab-content {
    display: none;
}

.fs-portal-tab-content.active {
    display: block;
}

/* Contract icon color */
.fs-icon-contract {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Main Content */
.fs-portal-main {
    flex: 1;
    padding: 32px 24px;
}

.fs-portal-content {
    max-width: 1200px;
    margin: 0 auto;
}

.fs-portal-page-header {
    margin-bottom: 32px;
}

.fs-portal-page-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--portal-gray-900);
}

/* Grid Layout */
.fs-portal-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
}

.fs-portal-main-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.fs-portal-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Cards */
.fs-portal-card {
    background: #fff;
    border: 1px solid var(--portal-gray-200);
    border-radius: 12px;
    overflow: hidden;
}

.fs-portal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--portal-gray-100);
}

.fs-portal-card-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--portal-gray-900);
    display: flex;
    align-items: center;
    gap: 8px;
}

.fs-portal-header-link {
    font-size: 14px;
    color: var(--portal-gray-500);
    text-decoration: none;
}

.fs-portal-header-link:hover {
    color: var(--portal-primary);
}

.fs-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--portal-gray-100);
    color: var(--portal-gray-600);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

.fs-portal-card-body {
    padding: 16px 20px;
}

/* Outstanding Items List */
.fs-portal-items-list {
    list-style: none;
}

.fs-portal-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--portal-gray-100);
}

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

.fs-portal-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fs-icon-invoice {
    background: #fef3c7;
    color: var(--portal-warning);
}

.fs-icon-proposal {
    background: #e0e7ff;
    color: #4f46e5;
}

.fs-portal-item-content {
    flex: 1;
    min-width: 0;
}

.fs-portal-item-title {
    font-weight: 500;
    color: var(--portal-gray-900);
}

.fs-portal-item-subtitle {
    color: var(--portal-gray-500);
}

.fs-portal-item-meta {
    font-size: 13px;
    color: var(--portal-gray-500);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fs-overdue-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #fef2f2;
    color: var(--portal-danger);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.fs-portal-item-amount {
    font-weight: 600;
    color: var(--portal-gray-900);
    margin-right: 16px;
}

/* Buttons */
.fs-portal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
    cursor: pointer;
    border: none;
}

.fs-portal-btn-primary {
    background: var(--portal-gray-900);
    color: #fff;
}

.fs-portal-btn-primary:hover {
    background: var(--portal-gray-700);
    color: #fff;
}

.fs-portal-btn-small {
    padding: 6px 12px;
    font-size: 13px;
    background: var(--portal-gray-100);
    color: var(--portal-gray-700);
}

.fs-portal-btn-small:hover {
    background: var(--portal-gray-200);
}

/* Projects List */
.fs-portal-projects-list {
    list-style: none;
}

.fs-portal-project {
    border-bottom: 1px solid var(--portal-gray-100);
}

.fs-portal-project:last-child {
    border-bottom: none;
}

.fs-portal-project-link {
    display: flex;
    align-items: center;
    padding: 16px 0;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.fs-portal-project-link:hover {
    background: var(--portal-gray-50);
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
}

.fs-portal-project-info {
    flex: 1;
}

.fs-portal-project-name {
    font-weight: 500;
    color: var(--portal-gray-900);
}

.fs-portal-project-dates {
    font-size: 13px;
    color: var(--portal-gray-500);
    margin-top: 2px;
}

.fs-portal-project-status {
    margin-right: 12px;
}

.fs-portal-project-arrow {
    color: var(--portal-gray-400);
}

/* Status Badges */
.fs-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.fs-status-pending {
    background: #fef3c7;
    color: #92400e;
}

.fs-status-active {
    background: #d1fae5;
    color: #065f46;
}

.fs-status-completed {
    background: #e0e7ff;
    color: #3730a3;
}

.fs-status-on_hold {
    background: var(--portal-gray-100);
    color: var(--portal-gray-600);
}

/* Deposit Status */
.fs-portal-deposit-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
}

.fs-portal-deposit-status.paid {
    background: #f0fdf4;
    color: #16a34a;
}

.fs-portal-deposit-status.unpaid {
    background: #fef3c7;
    color: #92400e;
}

.fs-portal-deposit-status svg {
    flex-shrink: 0;
}

/* Billing Stats */
.fs-portal-billing-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.fs-portal-stat {
    text-align: center;
}

.fs-portal-stat-label {
    font-size: 12px;
    color: var(--portal-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.fs-portal-stat-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--portal-gray-900);
}

.fs-text-success {
    color: var(--portal-success) !important;
}

.fs-text-danger {
    color: var(--portal-danger) !important;
}

/* Contact Section */
.fs-portal-contact {
    font-size: 14px;
}

.fs-portal-contact-name {
    font-weight: 600;
    color: var(--portal-gray-900);
    margin-bottom: 8px;
}

.fs-portal-contact p {
    margin: 4px 0;
    color: var(--portal-gray-600);
}

.fs-portal-contact a {
    color: var(--portal-primary);
    text-decoration: none;
}

.fs-portal-contact a:hover {
    text-decoration: underline;
}

/* Booking Card */
.fs-portal-booking-card {
    background: var(--portal-primary-bg);
    border: none;
}

.fs-portal-booking-card .fs-portal-card-body {
    padding: 24px 20px;
}

.fs-portal-booking {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.fs-portal-booking-icon {
    color: rgba(255, 255, 255, 0.9);
}

.fs-portal-booking-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fs-portal-booking-title {
    font-weight: 600;
    color: #fff;
    font-size: 16px;
}

.fs-portal-booking-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.fs-portal-btn-booking {
    background: #fff;
    color: var(--portal-primary);
    width: 100%;
}

.fs-portal-btn-booking:hover {
    background: var(--portal-gray-100);
    color: #047857;
}

/* Empty State */
.fs-portal-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--portal-gray-500);
}

.fs-portal-empty-small {
    padding: 20px;
}

/* Tasks List */
.fs-portal-tasks-list {
    list-style: none;
}

.fs-portal-task {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--portal-gray-100);
}

.fs-portal-task:last-child {
    border-bottom: none;
}

.fs-portal-task.completed .fs-portal-task-title {
    text-decoration: line-through;
    color: var(--portal-gray-400);
}

.fs-portal-task-checkbox {
    padding-top: 2px;
}

.fs-portal-task-checkbox input {
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

.fs-portal-task-content {
    flex: 1;
}

.fs-portal-task-title {
    font-weight: 500;
    color: var(--portal-gray-900);
}

.fs-portal-task-desc {
    font-size: 13px;
    color: var(--portal-gray-500);
    margin-top: 2px;
}

.fs-portal-task-due {
    font-size: 13px;
    color: var(--portal-gray-500);
    white-space: nowrap;
}

.fs-portal-task-due.overdue {
    color: var(--portal-danger);
}

.fs-portal-view-all {
    display: block;
    text-align: center;
    padding: 12px;
    color: var(--portal-gray-500);
    text-decoration: none;
    font-size: 14px;
    border-top: 1px solid var(--portal-gray-100);
    margin: 16px -20px -16px;
}

.fs-portal-view-all:hover {
    background: var(--portal-gray-50);
    color: var(--portal-gray-700);
}

/* Files List */
.fs-portal-files-list {
    list-style: none;
}

.fs-portal-file {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--portal-gray-100);
}

.fs-portal-file:last-child {
    border-bottom: none;
}

.fs-portal-file-icon {
    width: 32px;
    height: 32px;
    background: var(--portal-gray-100);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--portal-gray-500);
    flex-shrink: 0;
}

.fs-portal-file-content {
    flex: 1;
    min-width: 0;
}

.fs-portal-file-name {
    font-weight: 500;
    color: var(--portal-gray-900);
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fs-portal-file-name:hover {
    color: var(--portal-primary);
}

.fs-portal-file-meta {
    font-size: 12px;
    color: var(--portal-gray-500);
}

/* Table */
.fs-portal-table {
    width: 100%;
    border-collapse: collapse;
}

.fs-portal-table th,
.fs-portal-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--portal-gray-100);
}

.fs-portal-table th {
    font-size: 12px;
    font-weight: 600;
    color: var(--portal-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--portal-gray-50);
}

.fs-portal-table tbody tr:hover {
    background: var(--portal-gray-50);
}

/* Invoice number under project name */
.fs-invoice-number-small {
    font-size: 12px;
    color: var(--portal-gray-500);
    font-weight: 400;
    margin-top: 2px;
}

.fs-portal-invoice-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.fs-portal-invoice-status.fs-status-draft {
    background: var(--portal-gray-100);
    color: var(--portal-gray-600);
}

.fs-portal-invoice-status.fs-status-sent,
.fs-portal-invoice-status.fs-status-viewed {
    background: #fef3c7;
    color: #92400e;
}

.fs-portal-invoice-status.fs-status-partial {
    background: #fed7aa;
    color: #9a3412;
}

.fs-portal-invoice-status.fs-status-paid {
    background: #d1fae5;
    color: #065f46;
}

/* Footer */
.fs-portal-footer {
    text-align: center;
    padding: 24px;
    border-top: 1px solid var(--portal-gray-200);
    background: #fff;
    font-size: 13px;
    color: var(--portal-gray-500);
}

/* Responsive */
@media (max-width: 900px) {
    .fs-portal-grid {
        grid-template-columns: 1fr;
    }
    
    .fs-portal-sidebar {
        order: -1;
    }
    
    .fs-portal-billing-stats {
        grid-template-columns: 1fr 1fr 1fr;
    }
    
    .fs-portal-item {
        flex-wrap: wrap;
    }
    
    .fs-portal-item-amount {
        margin-left: 56px;
        margin-right: 0;
    }
    
    .fs-portal-item .fs-portal-btn {
        width: 100%;
        margin-top: 12px;
        margin-left: 56px;
    }
}

@media (max-width: 600px) {
    .fs-portal-header {
        padding: 0 16px;
    }
    
    .fs-portal-main {
        padding: 24px 16px;
    }
    
    .fs-portal-billing-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .fs-portal-stat {
        display: flex;
        justify-content: space-between;
        text-align: left;
    }
    
    .fs-portal-tabs {
        overflow-x: auto;
    }
    
    .fs-portal-tab {
        white-space: nowrap;
    }
}
 solid var(--portal-gray-300);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.fs-portal-custom-checkbox input:checked + .fs-portal-checkbox-mark {
    background: var(--portal-success);
    border-color: var(--portal-success);
}

.fs-portal-custom-checkbox input:checked + .fs-portal-checkbox-mark::after {
    content: '✓';
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.fs-portal-custom-checkbox:hover .fs-portal-checkbox-mark {
    border-color: var(--portal-success);
}

.fs-portal-task-info {
    flex: 1;
    min-width: 0;
}

.fs-portal-task-title.completed {
    text-decoration: line-through;
    color: var(--portal-gray-500);
}

.fs-portal-task-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--portal-gray-500);
    margin-top: 6px;
}

.fs-portal-task-meta.overdue {
    color: var(--portal-danger);
    font-weight: 500;
}

.fs-portal-task-done-badge {
    width: 28px;
    height: 28px;
    background: var(--portal-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

/* Task Status Indicators */
.fs-portal-task-status {
    flex-shrink: 0;
    width: 20px;
}

.fs-portal-task-done {
    width: 20px;
    height: 20px;
    background: var(--portal-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.fs-portal-task-pending {
    width: 14px;
    height: 14px;
    border: 2px solid var(--portal-gray-300);
    border-radius: 50%;
    margin: 3px;
}

/* Assignee Badges */
.fs-portal-task-badges {
    flex-shrink: 0;
}

.fs-portal-assignee-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.fs-portal-assignee-badge.client {
    background: #fce7f3;
    color: #db2777;
}

.fs-portal-assignee-badge.designer {
    background: #ede9fe;
    color: #7c3aed;
}

/* Billing Details */
.fs-portal-billing-details {
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 12px;
}

.fs-portal-billing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.fs-portal-billing-label {
    color: #6b7280;
    font-size: 14px;
}

.fs-portal-billing-value {
    font-weight: 600;
    color: #111827;
}

.fs-portal-billing-value small {
    font-weight: 400;
    color: #6b7280;
}

/* Milestones Section */
.fs-portal-milestones-section {
    padding: 24px;
}

.fs-portal-progress-overview {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 32px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 16px;
    margin-bottom: 32px;
}

.fs-portal-progress-circle {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

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

.fs-portal-progress-circle .fs-progress-bg {
    fill: none;
    stroke: #d1fae5;
    stroke-width: 3;
}

.fs-portal-progress-circle .fs-progress-fill {
    fill: none;
    stroke: #10b981;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s ease;
}

.fs-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.fs-progress-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #059669;
    line-height: 1;
}

.fs-progress-label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

.fs-portal-progress-stats {
    display: flex;
    gap: 40px;
}

.fs-progress-stat {
    text-align: center;
}

.fs-progress-stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

.fs-progress-stat-label {
    display: block;
    font-size: 14px;
    color: #6b7280;
    margin-top: 4px;
}

/* Milestones Timeline */
.fs-portal-milestones-timeline {
    position: relative;
    padding-left: 40px;
}

.fs-portal-milestones-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}

.fs-portal-milestone-item {
    position: relative;
    padding: 20px 0;
}

.fs-portal-milestone-item:last-child {
    padding-bottom: 0;
}

.fs-portal-milestone-marker {
    position: absolute;
    left: -40px;
    top: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    z-index: 1;
}

.fs-portal-milestone-item.completed .fs-portal-milestone-marker {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

.fs-portal-milestone-item.current .fs-portal-milestone-marker {
    background: #fff;
    border-color: #10b981;
    border-width: 3px;
    color: #10b981;
}

.fs-portal-milestone-content {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}

.fs-portal-milestone-item.completed .fs-portal-milestone-content {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.fs-portal-milestone-item.current .fs-portal-milestone-content {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.fs-portal-milestone-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.fs-portal-milestone-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.fs-portal-milestone-item.completed .fs-portal-milestone-title {
    color: #6b7280;
}

.fs-portal-current-badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    background: #d1fae5;
    color: #059669;
    border-radius: 12px;
}

.fs-portal-milestone-desc {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.fs-portal-milestone-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #9ca3af;
}

.fs-portal-milestone-date svg {
    opacity: 0.7;
}

.fs-portal-milestone-item.completed .fs-portal-milestone-date {
    color: #10b981;
}

/* Interactive Client Tasks */
.fs-portal-tasks-interactive .fs-portal-task-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.fs-portal-tasks-interactive .fs-portal-task-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.fs-portal-tasks-interactive .fs-portal-task-card.completed {
    background: #f9fafb;
    opacity: 0.7;
}

.fs-portal-tasks-interactive .fs-portal-task-card.completed .fs-portal-task-title {
    text-decoration: line-through;
    color: #9ca3af;
}

.fs-portal-tasks-interactive .fs-portal-task-card.overdue {
    border-color: #fecaca;
    background: #fef2f2;
}

.fs-portal-task-checkbox-wrap {
    padding-top: 2px;
}

.fs-portal-custom-checkbox {
    display: block;
    cursor: pointer;
}

.fs-portal-custom-checkbox input {
    display: none;
}

.fs-portal-checkbox-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.fs-portal-custom-checkbox input:checked + .fs-portal-checkbox-mark {
    background: #10b981;
    border-color: #10b981;
}

.fs-portal-custom-checkbox input:checked + .fs-portal-checkbox-mark::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.fs-portal-task-info {
    flex: 1;
}

.fs-portal-task-info .fs-portal-task-title {
    font-weight: 500;
    color: #111827;
    margin-bottom: 4px;
}

.fs-portal-task-meta {
    font-size: 13px;
    color: #6b7280;
}

.fs-portal-task-meta.overdue {
    color: #dc2626;
    font-weight: 500;
}

/* Responsive adjustments for milestones */
@media (max-width: 768px) {
    .fs-portal-progress-overview {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }
    
    .fs-portal-progress-stats {
        width: 100%;
        justify-content: center;
    }
    
    .fs-portal-milestones-timeline {
        padding-left: 24px;
    }
    
    .fs-portal-milestone-marker {
        left: -24px;
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
}

/* Client File Upload */
.fs-portal-client-upload {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--portal-gray-200);
}

.fs-portal-upload-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--portal-gray-700);
    margin-bottom: 12px;
}

.fs-portal-dropzone {
    border: 2px dashed var(--portal-gray-300);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--portal-gray-50);
}

.fs-portal-dropzone:hover,
.fs-portal-dropzone.active {
    border-color: var(--portal-primary);
    background: rgba(75, 124, 175, 0.05);
}

.fs-portal-dropzone-icon {
    color: var(--portal-gray-400);
    margin-bottom: 8px;
}

.fs-portal-dropzone:hover .fs-portal-dropzone-icon,
.fs-portal-dropzone.active .fs-portal-dropzone-icon {
    color: var(--portal-primary);
}

.fs-portal-dropzone-text {
    font-size: 14px;
    color: var(--portal-gray-600);
}

.fs-portal-upload-queue {
    margin-top: 12px;
}

.fs-portal-upload-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--portal-gray-100);
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 13px;
}

.fs-portal-upload-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fs-portal-upload-item-size {
    color: var(--portal-gray-500);
}

.fs-portal-upload-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--portal-gray-300);
    border-top-color: var(--portal-primary);
    border-radius: 50%;
    animation: portal-spin 0.8s linear infinite;
}

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

.fs-portal-upload-success {
    color: var(--portal-success);
}

.fs-portal-upload-error {
    color: var(--portal-danger);
}

/* ========================================
   Files Tab Styles
   ======================================== */

.fs-portal-files-tab {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.fs-portal-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.fs-portal-file-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--portal-gray-50);
    border: 1px solid var(--portal-gray-200);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.fs-portal-file-card:hover {
    background: #fff;
    border-color: var(--portal-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.fs-portal-file-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 8px;
    color: var(--portal-gray-500);
    flex-shrink: 0;
}

.fs-portal-file-card:hover .fs-portal-file-card-icon {
    color: var(--portal-primary);
}

.fs-portal-file-card-content {
    flex: 1;
    min-width: 0;
}

.fs-portal-file-card-name {
    font-weight: 500;
    color: var(--portal-gray-900);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
}

.fs-portal-file-card-meta {
    font-size: 12px;
    color: var(--portal-gray-500);
}

.fs-portal-file-category {
    text-transform: capitalize;
}

.fs-portal-file-card-action {
    color: var(--portal-gray-400);
    flex-shrink: 0;
}

.fs-portal-file-card:hover .fs-portal-file-card-action {
    color: var(--portal-primary);
}

.fs-portal-file-card-disabled {
    opacity: 0.6;
    cursor: default;
}

.fs-portal-file-card-disabled:hover {
    background: var(--portal-gray-50);
    border-color: var(--portal-gray-200);
    box-shadow: none;
    transform: none;
}

.fs-portal-upload-description {
    color: var(--portal-gray-600);
    margin-bottom: 20px;
}

.fs-portal-dropzone-large {
    padding: 48px;
}

.fs-portal-dropzone-large .fs-portal-dropzone-text {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
}

.fs-portal-dropzone-hint {
    color: var(--portal-gray-500);
    font-size: 14px;
    margin: 0;
}

/* ===== Task Request Modal ===== */
.fs-portal-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.fs-portal-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: fsPortalModalIn 0.2s ease-out;
}

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

.fs-portal-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--portal-gray-200);
}

.fs-portal-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--portal-gray-900);
}

.fs-portal-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--portal-gray-400);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
}

.fs-portal-modal-close:hover {
    color: var(--portal-gray-700);
}

.fs-portal-modal-body {
    padding: 24px;
}

.fs-portal-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--portal-gray-200);
}

.fs-portal-form-group {
    margin-bottom: 16px;
}

.fs-portal-form-group:last-child {
    margin-bottom: 0;
}

.fs-portal-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--portal-gray-700);
    margin-bottom: 6px;
}

.fs-portal-form-group label .required {
    color: #ef4444;
}

.fs-portal-form-group input[type="text"],
.fs-portal-form-group input[type="date"],
.fs-portal-form-group textarea,
.fs-portal-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--portal-gray-300);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: var(--portal-gray-800);
    transition: border-color 0.15s;
    background: #fff;
}

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

.fs-portal-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 500px) {
    .fs-portal-form-row {
        grid-template-columns: 1fr;
    }
}

/* Small button variant */
.fs-portal-btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.fs-portal-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: #fff;
    color: var(--portal-gray-700);
    border: 1px solid var(--portal-gray-300);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

.fs-portal-btn-secondary:hover {
    background: var(--portal-gray-50);
    border-color: var(--portal-gray-400);
}

/* ===== Dashboard Task List Styles ===== */
.fs-portal-tasks-dashboard-list {
    margin: 0;
}

.fs-portal-task-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--portal-gray-100);
}

.fs-portal-task-row:last-child {
    border-bottom: none;
}

.fs-portal-task-row-priority {
    width: 4px;
    height: 32px;
    border-radius: 2px;
    flex-shrink: 0;
}

.fs-portal-task-row-main {
    flex: 1;
    min-width: 0;
}

.fs-portal-task-row-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--portal-gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fs-portal-task-row.completed .fs-portal-task-row-title {
    text-decoration: line-through;
    color: var(--portal-gray-400);
}

.fs-portal-task-row-project {
    font-size: 12px;
    color: var(--portal-gray-500);
    margin-top: 2px;
}

.fs-portal-task-row-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.fs-portal-task-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.fs-portal-task-status-badge.requested {
    background: #fce7f3;
    color: #be185d;
}

.fs-portal-task-status-badge.pending {
    background: #fff7ed;
    color: #c2410c;
}

.fs-portal-task-status-badge.active {
    background: #ede9fe;
    color: #7c3aed;
}

.fs-portal-task-status-badge.sent {
    background: #ede9fe;
    color: #6d28d9;
}

.fs-portal-task-status-badge.completed {
    background: #ecfdf5;
    color: #059669;
}

.fs-portal-task-row-due {
    font-size: 12px;
    color: var(--portal-gray-500);
    white-space: nowrap;
}

.fs-portal-task-row-due.overdue {
    color: #dc2626;
    font-weight: 600;
}

.fs-portal-task-row-check {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #22c55e;
    flex-shrink: 0;
}

/* Completed tasks toggle */
.fs-portal-tasks-completed-toggle {
    padding: 12px 0 4px;
}

.fs-portal-toggle-completed {
    background: none;
    border: none;
    color: var(--portal-gray-500);
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    transition: color 0.15s;
}

.fs-portal-toggle-completed:hover {
    color: var(--portal-gray-700);
}

.fs-portal-toggle-completed svg {
    transition: transform 0.2s;
}

.fs-portal-toggle-completed.expanded svg {
    transform: rotate(180deg);
}

/* Task request header in project view */
.fs-portal-task-request-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

/* Success toast */
.fs-portal-success-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #059669;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    animation: fsToastIn 0.3s ease-out;
}

@keyframes fsToastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
