/**
 * Hartmann Project Manager - Frontend Styles
 */

/* CSS Variables - Light Mode (default) */
:root {
    --hpm-bg: #f8fafc;
    --hpm-surface: #ffffff;
    --hpm-surface-hover: #f1f5f9;
    --hpm-border: #e2e8f0;
    --hpm-text: #1e293b;
    --hpm-text-secondary: #64748b;
    --hpm-text-muted: #94a3b8;
    --hpm-primary: #6366f1;
    --hpm-primary-dark: #4f46e5;
    --hpm-primary-light: #818cf8;
    --hpm-success: #22c55e;
    --hpm-warning: #f59e0b;
    --hpm-danger: #ef4444;
    --hpm-info: #3b82f6;
    --hpm-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --hpm-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --hpm-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --hpm-radius: 12px;
    --hpm-radius-sm: 8px;
    --hpm-transition: all 0.2s ease;
}

/* Dark Mode */
[data-theme="dark"] {
    --hpm-bg: #0f172a;
    --hpm-surface: #1e293b;
    --hpm-surface-hover: #334155;
    --hpm-border: #334155;
    --hpm-text: #f1f5f9;
    --hpm-text-secondary: #94a3b8;
    --hpm-text-muted: #64748b;
    --hpm-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --hpm-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --hpm-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Reset for HPM wrapper */
.hpm-frontend-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--hpm-bg);
    color: var(--hpm-text);
    min-height: 100vh;
    line-height: 1.6;
}

.hpm-frontend-wrapper * {
    box-sizing: border-box;
}

/* Header */
.hpm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--hpm-surface);
    border-bottom: 1px solid var(--hpm-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.hpm-header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hpm-back-link {
    color: var(--hpm-text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--hpm-transition);
}

.hpm-back-link:hover {
    color: var(--hpm-primary);
}

.hpm-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--hpm-primary) 0%, var(--hpm-primary-dark) 100%);
    color: white;
    font-weight: 700;
    font-size: 14px;
    border-radius: var(--hpm-radius-sm);
}

.hpm-header h1 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: var(--hpm-text);
}

.hpm-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hpm-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--hpm-border);
    border-radius: var(--hpm-radius-sm);
    background: var(--hpm-surface);
    cursor: pointer;
    transition: var(--hpm-transition);
}

.hpm-theme-toggle:hover {
    background: var(--hpm-surface-hover);
}

.hpm-icon-dark {
    display: none;
}

[data-theme="dark"] .hpm-icon-light {
    display: none;
}

[data-theme="dark"] .hpm-icon-dark {
    display: inline;
}

.hpm-user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hpm-user-name {
    font-size: 14px;
    color: var(--hpm-text-secondary);
}

.hpm-notification-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--hpm-border);
    border-radius: var(--hpm-radius-sm);
    background: var(--hpm-surface);
    cursor: pointer;
    font-size: 18px;
}

.hpm-notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: var(--hpm-danger);
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Content */
.hpm-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* Welcome */
.hpm-welcome {
    margin-bottom: 32px;
}

.hpm-welcome h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--hpm-text);
}

.hpm-welcome p {
    font-size: 16px;
    color: var(--hpm-text-secondary);
    margin: 0;
}

/* Stats Row */
.hpm-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.hpm-stat-card {
    background: var(--hpm-surface);
    border-radius: var(--hpm-radius);
    padding: 24px;
    box-shadow: var(--hpm-shadow);
    text-align: center;
}

.hpm-stat-value {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 4px;
}

.hpm-stat-label {
    font-size: 14px;
    color: var(--hpm-text-secondary);
}

.hpm-stat-blue .hpm-stat-value { color: var(--hpm-primary); }
.hpm-stat-green .hpm-stat-value { color: var(--hpm-success); }
.hpm-stat-orange .hpm-stat-value { color: var(--hpm-warning); }
.hpm-stat-red .hpm-stat-value { color: var(--hpm-danger); }

/* Content Grid */
.hpm-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

/* Sections */
.hpm-section {
    background: var(--hpm-surface);
    border-radius: var(--hpm-radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--hpm-shadow);
}

.hpm-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.hpm-section-header h2,
.hpm-section-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.hpm-section > h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px;
}

/* Buttons */
.hpm-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: var(--hpm-radius-sm);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--hpm-transition);
    background: var(--hpm-surface);
    color: var(--hpm-text);
    border: 1px solid var(--hpm-border);
}

.hpm-btn:hover {
    background: var(--hpm-surface-hover);
}

.hpm-btn-primary {
    background: var(--hpm-primary);
    color: white;
    border-color: var(--hpm-primary);
}

.hpm-btn-primary:hover {
    background: var(--hpm-primary-dark);
}

.hpm-btn-success {
    background: var(--hpm-success);
    color: white;
    border-color: var(--hpm-success);
}

.hpm-btn-danger {
    background: var(--hpm-danger);
    color: white;
    border-color: var(--hpm-danger);
}

.hpm-btn-outline {
    background: transparent;
    color: var(--hpm-text);
}

.hpm-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Project Cards */
.hpm-projects-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hpm-project-card {
    background: var(--hpm-surface);
    border: 1px solid var(--hpm-border);
    border-radius: var(--hpm-radius-sm);
    padding: 20px;
    transition: var(--hpm-transition);
}

.hpm-project-card:hover {
    box-shadow: var(--hpm-shadow-md);
    border-color: var(--hpm-primary-light);
}

.hpm-project-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.hpm-project-header h3 {
    margin: 0;
    font-size: 16px;
}

.hpm-project-header a {
    color: var(--hpm-text);
    text-decoration: none;
}

.hpm-project-header a:hover {
    color: var(--hpm-primary);
}

.hpm-project-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 13px;
}

.hpm-meta-item {
    display: flex;
    gap: 4px;
}

.hpm-meta-label {
    color: var(--hpm-text-muted);
}

.hpm-meta-value {
    color: var(--hpm-text);
}

.hpm-meta-value.success { color: var(--hpm-success); }
.hpm-meta-value.warning { color: var(--hpm-warning); }
.hpm-meta-value.danger { color: var(--hpm-danger); }

/* Progress */
.hpm-project-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hpm-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--hpm-border);
    border-radius: 4px;
    overflow: hidden;
}

.hpm-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.hpm-progress-fill.hpm-progress-success { background: var(--hpm-success); }
.hpm-progress-fill.hpm-progress-warning { background: var(--hpm-warning); }
.hpm-progress-fill.hpm-progress-danger { background: var(--hpm-danger); }
.hpm-progress-fill.hpm-progress-neutral { background: var(--hpm-text-muted); }

.hpm-progress-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--hpm-text-secondary);
    min-width: 40px;
    text-align: right;
}

/* Progress Circle */
.hpm-progress-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: conic-gradient(var(--hpm-primary) calc(var(--progress) * 1%), var(--hpm-border) 0);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    position: relative;
}

.hpm-progress-circle::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    background: var(--hpm-surface);
    border-radius: 50%;
}

.hpm-progress-value {
    position: relative;
    font-size: 24px;
    font-weight: 700;
    color: var(--hpm-text);
}

.hpm-progress-bar-large {
    height: 12px;
    background: var(--hpm-border);
    border-radius: 6px;
    overflow: hidden;
}

/* Task Items */
.hpm-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hpm-task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--hpm-surface);
    border: 1px solid var(--hpm-border);
    border-radius: var(--hpm-radius-sm);
    transition: var(--hpm-transition);
}

.hpm-task-item:hover {
    background: var(--hpm-surface-hover);
}

.hpm-task-info h4 {
    margin: 0 0 4px;
    font-size: 14px;
}

.hpm-task-info a {
    color: var(--hpm-text);
    text-decoration: none;
}

.hpm-task-info a:hover {
    color: var(--hpm-primary);
}

.hpm-task-project {
    font-size: 12px;
    color: var(--hpm-text-muted);
}

.hpm-task-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hpm-task-deadline {
    font-size: 13px;
    color: var(--hpm-text-secondary);
}

.hpm-task-deadline.hpm-urgent {
    color: var(--hpm-danger);
    font-weight: 600;
}

.hpm-task-deadline.hpm-warning {
    color: var(--hpm-warning);
}

/* Badges */
.hpm-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hpm-badge-open {
    background: rgba(59, 130, 246, 0.1);
    color: var(--hpm-info);
}

.hpm-badge-submitted {
    background: rgba(245, 158, 11, 0.1);
    color: var(--hpm-warning);
}

.hpm-badge-approved {
    background: rgba(34, 197, 94, 0.1);
    color: var(--hpm-success);
}

.hpm-badge-reopened {
    background: rgba(239, 68, 68, 0.1);
    color: var(--hpm-danger);
}

.hpm-badge-priority-low {
    background: rgba(100, 116, 139, 0.1);
    color: var(--hpm-text-secondary);
}

.hpm-badge-priority-normal {
    background: rgba(59, 130, 246, 0.1);
    color: var(--hpm-info);
}

.hpm-badge-priority-high {
    background: rgba(245, 158, 11, 0.1);
    color: var(--hpm-warning);
}

.hpm-badge-priority-urgent {
    background: rgba(239, 68, 68, 0.1);
    color: var(--hpm-danger);
}

/* Priority indicators */
.hpm-priority-low { border-left: 3px solid var(--hpm-text-muted); }
.hpm-priority-normal { border-left: 3px solid var(--hpm-info); }
.hpm-priority-high { border-left: 3px solid var(--hpm-warning); }
.hpm-priority-urgent { border-left: 3px solid var(--hpm-danger); }

/* Project/Task Detail Header */
.hpm-project-detail-header,
.hpm-task-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--hpm-border);
}

.hpm-project-title-section h1,
.hpm-task-title-section h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px;
}

.hpm-project-badges,
.hpm-task-badges {
    display: flex;
    gap: 8px;
}

.hpm-project-actions,
.hpm-task-actions {
    display: flex;
    gap: 8px;
}

.hpm-task-project-ref {
    display: block;
    font-size: 14px;
    color: var(--hpm-text-secondary);
    margin-bottom: 8px;
}

.hpm-task-project-ref a {
    color: var(--hpm-primary);
    text-decoration: none;
}

/* Info Grid */
.hpm-project-info-grid,
.hpm-task-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.hpm-info-card {
    background: var(--hpm-surface);
    border: 1px solid var(--hpm-border);
    border-radius: var(--hpm-radius);
    padding: 24px;
}

.hpm-info-card h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--hpm-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 20px;
}

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

.hpm-info-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.hpm-info-label {
    color: var(--hpm-text-muted);
}

.hpm-info-value {
    color: var(--hpm-text);
    font-weight: 500;
}

/* Tables */
.hpm-tasks-table-wrapper {
    overflow-x: auto;
}

.hpm-tasks-table {
    width: 100%;
    border-collapse: collapse;
}

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

.hpm-tasks-table th {
    font-weight: 600;
    color: var(--hpm-text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hpm-tasks-table a {
    color: var(--hpm-text);
    text-decoration: none;
    font-weight: 500;
}

.hpm-tasks-table a:hover {
    color: var(--hpm-primary);
}

.hpm-progress-bar-small {
    width: 80px;
    height: 6px;
    background: var(--hpm-border);
    border-radius: 3px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

.hpm-progress-text-small {
    font-size: 12px;
    color: var(--hpm-text-secondary);
}

/* Documents */
.hpm-documents-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hpm-document-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--hpm-surface);
    border: 1px solid var(--hpm-border);
    border-radius: var(--hpm-radius-sm);
}

.hpm-document-icon {
    font-size: 32px;
}

.hpm-document-info {
    flex: 1;
}

.hpm-document-info h4 {
    margin: 0 0 4px;
    font-size: 14px;
}

.hpm-document-info p {
    margin: 0 0 8px;
    font-size: 12px;
    color: var(--hpm-text-muted);
}

.hpm-document-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.hpm-status-valid {
    background: rgba(34, 197, 94, 0.1);
    color: var(--hpm-success);
}

.hpm-status-expiring-soon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--hpm-warning);
}

.hpm-status-expired {
    background: rgba(239, 68, 68, 0.1);
    color: var(--hpm-danger);
}

.hpm-status-replaced {
    background: rgba(100, 116, 139, 0.1);
    color: var(--hpm-text-muted);
}

/* Task Items */
.hpm-task-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hpm-task-item-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: var(--hpm-surface);
    border: 1px solid var(--hpm-border);
    border-radius: var(--hpm-radius-sm);
}

.hpm-task-item-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hpm-primary);
    color: white;
    font-weight: 600;
    font-size: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.hpm-task-item-content {
    flex: 1;
}

.hpm-task-item-content h4 {
    margin: 0 0 4px;
    font-size: 14px;
}

.hpm-task-item-content p {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--hpm-text-secondary);
}

.hpm-task-item-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--hpm-text-muted);
}

.hpm-task-item-status {
    flex-shrink: 0;
}

/* Comments */
.hpm-comments-section {
    margin-top: 32px;
}

.hpm-comment-form-wrapper {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--hpm-border);
}

.hpm-comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hpm-comment {
    display: flex;
    gap: 16px;
}

.hpm-comment-avatar img {
    border-radius: 50%;
}

.hpm-comment-content {
    flex: 1;
}

.hpm-comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.hpm-comment-header strong {
    font-size: 14px;
}

.hpm-comment-time {
    font-size: 12px;
    color: var(--hpm-text-muted);
}

.hpm-comment-text {
    font-size: 14px;
    color: var(--hpm-text);
    line-height: 1.6;
}

/* Forms */
.hpm-form-group {
    margin-bottom: 16px;
}

.hpm-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--hpm-text);
}

.hpm-form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--hpm-border);
    border-radius: var(--hpm-radius-sm);
    font-size: 14px;
    color: var(--hpm-text);
    background: var(--hpm-surface);
    transition: var(--hpm-transition);
}

.hpm-form-control:focus {
    outline: none;
    border-color: var(--hpm-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

select.hpm-form-control {
    height: 42px;
}

.hpm-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.hpm-help-text {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--hpm-text-muted);
}

.hpm-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* Modal */
.hpm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.hpm-modal-content {
    background: var(--hpm-surface);
    border-radius: var(--hpm-radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--hpm-shadow-lg);
}

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

.hpm-modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.hpm-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--hpm-text-muted);
    cursor: pointer;
}

.hpm-modal-body {
    padding: 24px;
}

/* Empty State */
.hpm-empty-state {
    text-align: center;
    padding: 40px;
    color: var(--hpm-text-muted);
}

.hpm-empty {
    text-align: center;
    padding: 20px;
    color: var(--hpm-text-muted);
    font-style: italic;
}

/* Error */
.hpm-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--hpm-danger);
    padding: 16px 20px;
    border-radius: var(--hpm-radius-sm);
    margin: 20px;
}

/* Notifications Modal */
.hpm-notifications-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hpm-notification-item {
    padding: 16px;
    border-bottom: 1px solid var(--hpm-border);
    cursor: pointer;
    transition: var(--hpm-transition);
}

.hpm-notification-item:hover {
    background: var(--hpm-surface-hover);
}

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

.hpm-notification-item strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.hpm-notification-item p {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--hpm-text-secondary);
}

.hpm-notification-time {
    font-size: 11px;
    color: var(--hpm-text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .hpm-header {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }
    
    .hpm-main {
        padding: 16px;
    }
    
    .hpm-content-grid {
        grid-template-columns: 1fr;
    }
    
    .hpm-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hpm-project-detail-header,
    .hpm-task-detail-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .hpm-project-actions,
    .hpm-task-actions {
        flex-wrap: wrap;
    }
    
    .hpm-form-row {
        grid-template-columns: 1fr;
    }
    
    .hpm-tasks-table {
        font-size: 13px;
    }
    
    .hpm-tasks-table th,
    .hpm-tasks-table td {
        padding: 8px 12px;
    }
}

/* Urgent/Warning indicators */
.hpm-urgent {
    color: var(--hpm-danger) !important;
    font-weight: 600;
}

.hpm-warning {
    color: var(--hpm-warning) !important;
}

/* Add Task Form (Inline) */
.hpm-add-task-form {
    background: var(--hpm-surface);
    border: 1px solid var(--hpm-border);
    border-radius: var(--hpm-radius);
    padding: 24px;
    margin-bottom: 24px;
}

.hpm-task-items-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--hpm-border);
}

.hpm-task-items-section h4 {
    margin: 0 0 16px;
    font-size: 16px;
    color: var(--hpm-text);
}

/* Task Item Row (in form) */
.hpm-task-item-row {
    background: var(--hpm-surface-hover);
    border: 1px solid var(--hpm-border);
    border-radius: var(--hpm-radius-sm);
    padding: 16px;
    margin-bottom: 12px;
}

.hpm-task-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.hpm-task-item-number {
    font-weight: 600;
    color: var(--hpm-primary);
}

.hpm-remove-task-item {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
}

/* Task Cards in Project View */
.hpm-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hpm-task-card {
    background: var(--hpm-surface);
    border: 1px solid var(--hpm-border);
    border-radius: var(--hpm-radius-sm);
    padding: 20px;
    transition: var(--hpm-transition);
}

.hpm-task-card:hover {
    box-shadow: var(--hpm-shadow-md);
}

.hpm-task-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.hpm-task-header h4 {
    margin: 0;
    font-size: 16px;
}

.hpm-task-header a {
    color: var(--hpm-text);
    text-decoration: none;
}

.hpm-task-header a:hover {
    color: var(--hpm-primary);
}

.hpm-task-badges {
    display: flex;
    gap: 8px;
}

.hpm-task-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 13px;
}

.hpm-task-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Task Items Detailed View */
.hpm-task-items-list-detailed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hpm-task-item-detailed {
    background: var(--hpm-surface);
    border: 1px solid var(--hpm-border);
    border-radius: var(--hpm-radius);
    overflow: hidden;
}

.hpm-task-item-detailed .hpm-task-item-header {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 16px;
    align-items: center;
    padding: 16px 20px;
    background: var(--hpm-surface);
    border-bottom: 1px solid var(--hpm-border);
}

.hpm-task-item-detailed .hpm-task-item-number {
    width: 36px;
    height: 36px;
    background: var(--hpm-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.hpm-task-item-title h4 {
    margin: 0 0 4px;
    font-size: 15px;
}

.hpm-task-item-title p {
    margin: 0;
    font-size: 13px;
    color: var(--hpm-text-secondary);
}

.hpm-task-item-detailed .hpm-task-item-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
}

/* Task Item Response */
.hpm-task-item-response,
.hpm-task-item-response-display {
    padding: 20px;
    background: var(--hpm-surface-hover);
    border-top: 1px solid var(--hpm-border);
}

.hpm-task-item-response h5,
.hpm-task-item-response-display h5 {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--hpm-text-secondary);
}

.hpm-response-text {
    background: var(--hpm-surface);
    border: 1px solid var(--hpm-border);
    border-radius: var(--hpm-radius-sm);
    padding: 12px;
    font-size: 14px;
    line-height: 1.6;
}

.hpm-task-item-response-form {
    max-width: 600px;
}

/* Checkbox label */
.hpm-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.hpm-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--hpm-primary);
}
