/* Basic card styling */
.card {
    background-color: var(--dds-white);
    border: 1px solid #e0e0e0; 
    border-radius: var(--radius-lg); 
    padding: var(--space-3);
    margin-bottom: var(--space-3); /* Retain for cases where cards are not in a grid with gap */
    box-shadow: var(--shadow-md); 
}

.card-header { /* Generic card header, can be specialized */
    font-size: 1.2rem;
    font-family: var(--font-subhead); 
    font-weight: var(--weight-regular);
    margin-bottom: var(--space-2);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid #eee;
}

/* Stats Cards */
.stat-card {
    background-color: var(--dds-white); 
    border: 1px solid #e0e0e0;       
    border-radius: var(--radius-lg);  
    padding: 1.5rem 2rem;            
    box-shadow: var(--shadow-md);     
}

.stat-card-header { /* Specific to stat-card's header */
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2);
    color: #6c757d;
    font-size: 0.9rem;
    font-family: var(--font-body);
}
.stat-card-header .stat-icon {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.stat-card-value {
    font-size: 2rem;
    font-family: var(--font-display); 
    font-weight: var(--weight-bold);
    color: var(--text-headings);
    margin-bottom: var(--space-1);
}

.stat-card-change {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-family: var(--font-body);
}
.stat-card-change.increase {
    color: var(--status-increase-green);
}
.stat-card-change.decrease {
    color: var(--status-error);
}
.stat-card small {
    font-size: 0.8rem;
    color: #6c757d;
    display: block;
    margin-top: var(--space-1);
    font-family: var(--font-body);
}

/* Project Card (Dashboard Version) */
.project-card { 
    background-color: #f8f9fa; 
    padding: var(--space-3);
    border-radius: var(--radius-md); 
    border: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    font-family: var(--font-body);
}
.project-card-header { /* Specific to project-card's header on dashboard */
    display: flex;
    align-items: flex-start; 
    gap: var(--space-2);
    margin-bottom: var(--space-2);
    border-bottom: none; /* Override generic .card-header if it was applied */
    padding-bottom: 0;   /* Override generic .card-header if it was applied */
}
.project-card .project-icon {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-top: var(--space-1);
}
.project-card-header h3 { 
    margin: 0 0 var(--space-1) 0;
    font-size: 1.1rem;
    font-family: var(--font-subhead);
    font-weight: var(--weight-regular);
    color: var(--text-headings);
}
.project-card-header p { /* Description within header */
    margin: 0;
    font-size: 0.85rem;
    color: #6c757d;
    flex-grow: 1;
}
.project-assignee { /* Used in dashboard project card */
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: var(--space-2);
}
.project-card label { 
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: var(--space-1);
    display: block;
}
.project-card .progress-bar-container {
    width: calc(100% - 45px); 
    background-color: #e9ecef; 
    border-radius: var(--radius-sm);
    height: 10px;
    margin-bottom: var(--space-1);
    position: relative; 
    display: inline-block; 
}
.project-card .progress-bar {
    background-color: var(--accent-color);
    height: 100%;
    border-radius: var(--radius-sm);
}
.project-card .progress-bar-container span { 
    position: absolute;
    left: calc(100% + var(--space-2)); 
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: #6c757d; 
    white-space: nowrap;
}
.project-meta { /* Used in dashboard project card */
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: var(--space-2);
    margin-bottom: var(--space-3);
}
.project-card .view-button { 
    margin-top: auto; 
    align-self: flex-end;
}


/* Project Card Item (Projects Page Version) */
.project-card-item { 
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: var(--radius-md);
    padding: var(--space-3); 
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    font-family: var(--font-body);
}
.project-card-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; 
    margin-bottom: var(--space-3);
}
.project-card-item-title-section {
    display: flex;
    align-items: flex-start; 
    gap: var(--space-2);
    flex-grow: 1; 
}
.project-item-icon {
    font-size: 1.5rem; 
    color: var(--accent-color); 
    margin-top: var(--space-1); 
}
.project-card-item-header h3 { 
    margin: 0 0 var(--space-1) 0;
    font-size: 1.15rem; 
    font-family: var(--font-subhead);
    font-weight: var(--weight-regular);
    color: var(--text-headings);
}
.project-item-description {
    margin: 0;
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(1.4 * 0.85rem * 2); 
}
.project-item-assignee {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: var(--space-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.project-item-assignee i {
    color: #6c757d;
}
.project-item-progress {
    margin-bottom: var(--space-3);
}
.project-item-progress label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: var(--space-1);
    display: block;
}
.project-item-progress .progress-display-area { 
    display: flex;
    align-items: center;
    width: 100%;
}
.project-item-progress .progress-bar-track { 
    flex-grow: 1; 
    height: 8px;
    background-color: #e9ecef;
    border-radius: var(--radius-sm);
    position: relative; 
    overflow: hidden; 
}
.project-item-progress .progress-bar { 
    height: 100%;
    background-color: var(--accent-color); 
    border-radius: var(--radius-sm); 
}
.project-item-progress .progress-percentage { 
    margin-left: var(--space-2); 
    font-size: 0.85rem;
    color: var(--text-headings);
    font-weight: var(--weight-regular); 
    font-family: var(--font-subhead);
    flex-shrink: 0; 
}
.project-item-meta {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: var(--space-4); 
    display: flex;
    align-items: center;
    gap: var(--space-1); 
}
.project-item-meta i {
    font-size: 0.8rem; 
}
.project-card-item-footer {
    margin-top: auto; 
    display: flex;
    justify-content: flex-end; 
}

/* Client Card Item (Clients Page Version) */
.client-card-item { 
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: var(--radius-md);
    padding: var(--space-3);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    font-family: var(--font-body);
}
.client-card-header { /* Specific to client card */
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
    border-bottom: none; /* Override generic .card-header */
    padding-bottom: 0;   /* Override generic .card-header */
}
.client-avatar { 
    width: 40px;
    height: 40px;
}
.project-count-badge { 
    font-size: 0.75rem;
    padding: var(--space-1) var(--space-2);
    border-radius: 12px; 
    font-weight: var(--weight-regular); 
    font-family: var(--font-subhead);
    background-color: #e0e0e0; 
    color: var(--dds-black);
}
.client-card-body h3 { 
    margin: 0 0 var(--space-2) 0;
    font-size: 1.25rem;
    font-family: var(--font-subhead);
    font-weight: var(--weight-regular);
    color: var(--text-headings);
}
.client-detail {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.9rem;
    color: #555;
    margin-bottom: var(--space-1);
}
.client-detail i {
    color: #888; 
    width: 16px; 
    text-align: center;
}
.client-added-date {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: var(--space-2);
    margin-bottom: var(--space-3);
}
.client-card-footer {
    margin-top: auto; 
    text-align: right; 
}

/* Form Card Item (Forms Page Version) */
.form-card-item {
    /* Inherits .card styles if applied, or define similar base here */
    /* For now, assuming it will get .card class or these are added to .form-card-item directly */
    background-color: #f8f9fa; /* Example, match other cards */
    border: 1px solid #dee2e6;
    border-radius: var(--radius-md);
    padding: var(--space-3);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    font-family: var(--font-body);
}
.form-card-header { /* Specific to form card */
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3); 
    border-bottom: none; /* Override generic .card-header */
    padding-bottom: 0;   /* Override generic .card-header */
}
.form-card-body h3 {
    margin: 0 0 var(--space-2) 0; 
    font-size: 1.15rem; 
}
.form-meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: var(--space-2); 
}
.form-meta-item i {
    width: 16px; 
    text-align: center;
}
.form-meta-item.updated-date {
    margin-top: var(--space-2); 
    margin-bottom: 0; 
}
.form-card-body label { 
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: var(--space-1);
    display: block;
}
.form-card-item .progress-bar-container { /* Copied from .project-card for consistency */
    width: calc(100% - 45px); 
    background-color: #e9ecef; 
    border-radius: var(--radius-sm);
    height: 10px;
    margin-bottom: var(--space-1);
    position: relative; 
    display: inline-block; 
}
.form-card-item .progress-bar {
    background-color: var(--accent-color); 
    height: 100%;
    border-radius: var(--radius-sm);
}
.form-card-item .progress-bar-container span { 
    position: absolute;
    left: calc(100% + var(--space-2)); 
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: #6c757d; 
    white-space: nowrap;
}
.form-card-footer {
    margin-top: auto; 
    padding-top: var(--space-3);
    border-top: 1px solid #eee; 
    display: flex;
    justify-content: flex-end;
}

/* Template Card (Page Templates Page Version) */
.template-card {
    display: flex;
    flex-direction: column;
    /* Inherits .card styles: background, border-radius, box-shadow */
}
.template-card-header { /* Contains preview */
    padding: var(--space-3);
    border-bottom: none; /* Override generic .card-header */
}
.template-preview {
    background-color: #e9ecef; 
    border-radius: var(--radius-sm);
    min-height: 180px; 
    display: flex;
    flex-direction: column; 
    justify-content: center; 
    padding: var(--space-3);
}
.template-preview-content {
    width: 100%; 
}
.template-preview-content .preview-placeholder-text {
    font-size: 1.1rem;
    color: #6c757d;
    font-family: var(--font-subhead);
    margin-bottom: var(--space-2); 
    text-align: center; 
}
.preview-title-fields-group {
    text-align: left; 
    width: 100%; 
}
.preview-title-fields-group h3 { 
    margin: 0 0 var(--space-1) 0; 
    font-size: 1.1rem; 
    font-family: var(--font-subhead);
    font-weight: var(--weight-regular);
    color: #333; 
}
.preview-title-fields-group .preview-placeholder-fields { 
    font-size: 0.85rem;
    color: #555;
    font-family: var(--font-body);
}
.template-card-footer { /* Contains meta and actions */
    padding: var(--space-3);
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.template-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}
.template-type {
    font-size: 0.85rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: var(--space-1);
}
.template-type i {
    font-size: 0.9rem;
}
.template-card-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.template-menu-container {
    position: relative;
}
.template-menu-dropdown {
    min-width: 180px; 
}
.template-menu-item {
    display: flex !important; 
    align-items: center;
    gap: var(--space-2);
}
.template-menu-item i {
    width: 16px;
    text-align: center;
}
.template-menu-item.danger-action,
.template-menu-item.danger-action i {
    color: var(--dds-red-100) !important;
}
.template-menu-item.danger-action:hover {
    background-color: rgba(255, 81, 81, 0.1) !important;
}
.template-card-details { /* Contains sections, uses, updated */
    padding: var(--space-3);
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.template-sections-info {
    font-size: 0.8rem;
    color: #6c757d;
    display: flex;
    gap: var(--space-3); 
}
.template-sections-info span:not(:last-child)::after {
    content: "•";
    margin-left: var(--space-3);
    color: #ccc;
}
.template-card-edit-action { /* Contains Edit button */
    padding: var(--space-3);
    border-top: 1px solid #eee;
    margin-top: auto; 
}

/* Origin badges for Template Cards */
.origin-badge {
    display: inline-block;
    margin-left: var(--space-2);
    font-size: 0.7rem;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 9999px;
    border: 1px solid transparent;
    vertical-align: middle;
}
.origin-badge.custom {
    background: #dbeafe;         /* blue-100 */
    color: #1d4ed8;              /* blue-700 */
    border-color: #bfdbfe;       /* blue-200 */
}
.origin-badge.default {
    background: #f3f4f6;         /* gray-100 */
    color: #374151;              /* gray-700 */
    border-color: #e5e7eb;       /* gray-200 */
}

/* Dark mode tweaks for badges */
body.dark-mode .origin-badge.default {
    background: rgba(255,255,255,0.08);
    color: var(--text-secondary-dark);
    border-color: var(--border-secondary-dark);
}
body.dark-mode .origin-badge.custom {
    background: rgba(59,130,246,0.15); /* blue-500 at low opacity */
    color: #93c5fd;                    /* blue-300 */
    border-color: rgba(147,197,253,0.4);
}

/* Page Card (Content Management "Pages" page) */
.page-card {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: var(--radius-md);
    padding: var(--space-3);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    font-family: var(--font-body);
}
.page-card-header { /* Specific to page-card */
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-3);
    border-bottom: none; /* Override generic .card-header */
    padding-bottom: 0;   /* Override generic .card-header */
}

/* Page Menu (kebab menu for page cards) */
.page-menu-container {
    position: relative;
}
.page-menu-button {
    background: none;
    border: none;
    padding: var(--space-1);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}
.page-menu-button:hover {
    background-color: var(--bg-quaternary, #f3f4f6);
    color: var(--text-primary);
}
.page-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    background: var(--bg-default, #fff);
    border: 1px solid var(--border-default, #e5e7eb);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    padding: var(--space-1) 0;
}
.page-menu-dropdown.hidden {
    display: none;
}
.page-menu-item {
    display: flex !important;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    white-space: nowrap;
}
.page-menu-item:hover {
    background-color: var(--bg-quaternary, #f3f4f6);
}
.page-menu-item i {
    width: 16px;
    text-align: center;
}
.page-menu-item.danger-action,
.page-menu-item.danger-action i {
    color: var(--dds-red-100) !important;
}
.page-menu-item.danger-action:hover {
    background-color: rgba(255, 81, 81, 0.1) !important;
}

/* Dark mode for page menu */
body.dark-mode .page-menu-button {
    color: var(--text-secondary-dark);
}
body.dark-mode .page-menu-button:hover {
    background-color: var(--bg-quaternary-dark);
    color: var(--text-primary-dark);
}
body.dark-mode .page-menu-dropdown {
    background: var(--bg-tertiary-dark);
    border-color: var(--border-primary-dark);
    box-shadow: var(--shadow-lg-dark);
}
body.dark-mode .page-menu-item {
    color: var(--text-primary-dark);
}
body.dark-mode .page-menu-item:hover {
    background-color: var(--bg-quaternary-dark);
}
body.dark-mode .page-menu-item i {
    color: var(--text-secondary-dark);
}
.page-card-header h4 { 
    margin: 0 0 var(--space-1) 0;
    font-size: 1.15rem;
    font-family: var(--font-subhead);
    font-weight: var(--weight-regular);
    color: var(--text-headings);
}
.page-card-header .page-subtitle {
    margin: 0;
    font-size: 0.85rem;
    color: #6c757d; 
}
.completion-progress-container {
    margin-bottom: var(--space-3);
}
.completion-progress-container label {
    font-size: 0.9rem;
    color: var(--text-headings);
    font-weight: var(--weight-regular); 
    font-family: var(--font-subhead);
    margin-bottom: var(--space-2);
    display: block;
}
.progress-bar-wrapper { /* Used in page-card */
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.progress-bar-wrapper progress {
    flex-grow: 1;
    height: 10px;
    border-radius: var(--radius-sm);
    overflow: hidden; 
}
.progress-bar-wrapper progress::-webkit-progress-bar {
    background-color: #e9ecef;
    border-radius: var(--radius-sm);
}
.progress-bar-wrapper progress::-webkit-progress-value {
    background-color: var(--accent-color); 
    border-radius: var(--radius-sm);
}
.progress-bar-wrapper progress::-moz-progress-bar { 
    background-color: var(--accent-color);
    border-radius: var(--radius-sm);
}
.progress-bar-wrapper span {
    font-size: 0.9rem;
    color: var(--text-headings);
    font-weight: var(--weight-regular); 
    font-family: var(--font-subhead);
}
.page-sections-details {
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid #eee;
}
.page-sections-title { 
    font-size: 0.95rem;
    font-weight: var(--weight-regular);
    font-family: var(--font-subhead);
    color: var(--text-headings);
    margin-bottom: var(--space-2);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.page-sections-title i {
    color: #6c757d; 
}
.page-sections-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.page-sections-details li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2) 0;
    font-size: 0.9rem;
    color: #555; 
}
.page-sections-details li:not(:last-child) {
    border-bottom: 1px dashed #f0f0f0;
}
.progress-bar-wrapper-small {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 100px; 
}
.progress-bar-wrapper-small progress {
    width: 50px; 
    height: 6px;
    border-radius: 3px;
}
.progress-bar-wrapper-small progress::-webkit-progress-bar {
    background-color: #e9ecef;
    border-radius: 3px;
}
.progress-bar-wrapper-small progress::-webkit-progress-value {
    background-color: var(--accent-color);
    border-radius: 3px;
}
.progress-bar-wrapper-small progress::-moz-progress-bar {
    background-color: var(--accent-color);
    border-radius: 3px;
}
.progress-bar-wrapper-small span {
    font-size: 0.85rem;
    color: #555; 
    white-space: nowrap;
    font-family: var(--font-subhead); 
}
.fa-check-circle-green { 
    color: var(--accent-color); 
    margin-left: var(--space-1);
}
.page-card-footer {
    margin-top: var(--space-4); 
    padding-top: var(--space-3);
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.last-updated {
    font-size: 0.8rem;
    color: #6c757d; 
    display: flex;
    align-items: center;
    gap: var(--space-1);
}
.last-updated i {
    font-size: 0.9rem; 
}


/* --- Dark Mode Card Styles --- */

body.dark-mode .card,
body.dark-mode .stat-card,
body.dark-mode .project-card,
body.dark-mode .project-card-item, 
body.dark-mode .client-card-item,
body.dark-mode .form-card-item,
body.dark-mode .template-card,
body.dark-mode .page-card {
    background-color: var(--bg-secondary-dark);
    border-color: var(--border-primary-dark);
    box-shadow: var(--shadow-md-dark);
    color: var(--text-primary-dark);
}

/* Generic text colors within any card in dark mode */
body.dark-mode .card h1, body.dark-mode .card h2, body.dark-mode .card h3, body.dark-mode .card h4,
body.dark-mode .stat-card h1, body.dark-mode .stat-card h2, body.dark-mode .stat-card h3, body.dark-mode .stat-card h4,
body.dark-mode .project-card h1, body.dark-mode .project-card h2, body.dark-mode .project-card h3, body.dark-mode .project-card h4,
body.dark-mode .project-card-item h1, body.dark-mode .project-card-item h2, body.dark-mode .project-card-item h3, body.dark-mode .project-card-item h4,
body.dark-mode .client-card-item h1, body.dark-mode .client-card-item h2, body.dark-mode .client-card-item h3, body.dark-mode .client-card-item h4,
body.dark-mode .form-card-item h1, body.dark-mode .form-card-item h2, body.dark-mode .form-card-item h3, body.dark-mode .form-card-item h4,
body.dark-mode .template-card h1, body.dark-mode .template-card h2, body.dark-mode .template-card h3, body.dark-mode .template-card h4,
body.dark-mode .page-card h1, body.dark-mode .page-card h2, body.dark-mode .page-card h3, body.dark-mode .page-card h4 {
    color: var(--text-headings); /* Uses dark mode --text-headings which is white */
}

body.dark-mode .card p, body.dark-mode .card span, body.dark-mode .card label, body.dark-mode .card small,
body.dark-mode .stat-card p, body.dark-mode .stat-card span, body.dark-mode .stat-card label, body.dark-mode .stat-card small,
body.dark-mode .project-card p, body.dark-mode .project-card span, body.dark-mode .project-card label, body.dark-mode .project-card small,
body.dark-mode .project-card-item p, body.dark-mode .project-card-item span, body.dark-mode .project-card-item label, body.dark-mode .project-card-item small,
body.dark-mode .client-card-item p, body.dark-mode .client-card-item span, body.dark-mode .client-card-item label, body.dark-mode .client-card-item small,
body.dark-mode .form-card-item p, body.dark-mode .form-card-item span, body.dark-mode .form-card-item label, body.dark-mode .form-card-item small,
body.dark-mode .template-card p, body.dark-mode .template-card span, body.dark-mode .template-card label, body.dark-mode .template-card small,
body.dark-mode .page-card p, body.dark-mode .page-card span, body.dark-mode .page-card label, body.dark-mode .page-card small {
    color: var(--text-primary-dark); 
}

body.dark-mode .card .text-secondary-dark, 
body.dark-mode .stat-card .text-secondary-dark,
body.dark-mode .project-card .text-secondary-dark,
body.dark-mode .project-card-item .text-secondary-dark,
body.dark-mode .client-card-item .text-secondary-dark,
body.dark-mode .form-card-item .text-secondary-dark,
body.dark-mode .template-card .text-secondary-dark,
body.dark-mode .page-card .text-secondary-dark {
    color: var(--text-secondary-dark) !important; 
}

/* Specific Dark Mode Card Element Styles */
body.dark-mode .card-header,
body.dark-mode .template-card-footer,
body.dark-mode .template-card-details,
body.dark-mode .template-card-edit-action,
body.dark-mode .form-card-footer,
body.dark-mode .page-card-footer,
body.dark-mode .page-sections-details {
    border-color: var(--border-secondary-dark);
}

body.dark-mode .stat-card-header span,
body.dark-mode .stat-card small,
body.dark-mode .project-card label,
body.dark-mode .project-item-progress label,
body.dark-mode .project-item-meta,
body.dark-mode .project-item-description,
body.dark-mode .project-card-header p, 
body.dark-mode .project-assignee, 
body.dark-mode .project-meta, 
body.dark-mode .form-meta,
body.dark-mode .form-meta-item,
body.dark-mode .form-card-body label,
body.dark-mode .activity-description,
body.dark-mode .activity-time,
body.dark-mode .client-detail,
body.dark-mode .client-added-date,
body.dark-mode .page-card-header .page-subtitle,
body.dark-mode .last-updated,
body.dark-mode .template-type,
body.dark-mode .template-sections-info,
body.dark-mode .preview-placeholder-text,
body.dark-mode .preview-title-fields-group .preview-placeholder-fields,
body.dark-mode .page-sections-title i,
body.dark-mode .page-sections-details li,
body.dark-mode .progress-bar-wrapper-small span {
    color: var(--text-secondary-dark);
}
body.dark-mode .form-meta-item i {
    color: var(--text-tertiary-dark); 
}
body.dark-mode .template-type i {
    color: var(--text-tertiary-dark);
}
body.dark-mode .template-sections-info span:not(:last-child)::after {
    color: var(--border-tertiary-dark);
}


body.dark-mode .stat-card-value,
body.dark-mode .project-card-item-header h3,
body.dark-mode .project-card-header h3, 
body.dark-mode .project-item-assignee, 
body.dark-mode .project-item-progress .progress-percentage,
body.dark-mode .form-title,
body.dark-mode .form-card-body h3,
body.dark-mode .activity-title,
body.dark-mode .client-card-body h3,
body.dark-mode .page-card-header h4,
body.dark-mode .completion-progress-container label,
body.dark-mode .progress-bar-wrapper span,
body.dark-mode .page-sections-title,
body.dark-mode .preview-title-fields-group h3 {
    color: var(--text-primary-dark);
}

body.dark-mode .progress-bar-container, 
body.dark-mode .project-item-progress .progress-bar-track,
body.dark-mode .form-card-item .progress-bar-container,
body.dark-mode .progress-bar-wrapper progress::-webkit-progress-bar,
body.dark-mode .progress-bar-wrapper-small progress::-webkit-progress-bar { 
    background-color: var(--bg-quaternary-dark);
}
body.dark-mode .progress-bar,
body.dark-mode .form-card-item .progress-bar,
body.dark-mode .progress-bar-wrapper progress::-webkit-progress-value, /* Already red, but ensure it's the bright one */
body.dark-mode .progress-bar-wrapper progress::-moz-progress-bar,
body.dark-mode .progress-bar-wrapper-small progress::-webkit-progress-value,
body.dark-mode .progress-bar-wrapper-small progress::-moz-progress-bar {
    background-color: var(--accent-color); 
}


body.dark-mode .project-count-badge {
    background-color: rgba(224, 224, 224, 0.1); 
    color: var(--text-secondary-dark);
}

body.dark-mode .template-preview {
    background-color: var(--bg-tertiary-dark); 
}

body.dark-mode .fa-check-circle-green {
    color: var(--accent-color); 
}

/* Icons on cards in dark mode */
body.dark-mode .stat-icon,
body.dark-mode .project-icon,
body.dark-mode .project-item-icon,
body.dark-mode .section-heading-with-icon .section-icon {
    color: var(--accent-color) !important; 
}

/* Client Project Card Variant */
.project-card-item--client-view {
    background-color: var(--dds-white);
    border: 1px solid #e0e0e0;
}

.project-card-item--client-view .project-item-icon {
    display: none;
}

.project-card-item--client-view .project-card-item-title-section {
    flex-direction: column;
    align-items: flex-start;
}

.project-card-item--client-view .project-card-item-header h3 {
    font-size: 1rem;
}

.project-card-item--client-view .project-item-description {
    -webkit-line-clamp: 1;
    line-clamp: 1;
    min-height: auto;
}

.project-card-item--client-view .project-item-assignee {
    display: none;
}

.project-card-item--client-view .project-card-item-footer {
    display: none;
}

body.dark-mode .project-card-item--client-view {
    background-color: var(--bg-secondary-dark);
    border-color: var(--border-primary-dark);
}

/* New Client Project Card Styles */
