/* PROJECT HUB - LAYOUT */
.phase-card{background:#ffffff;color:var(--midnight-navy);border-radius:10px;padding:20px;margin:20px auto;max-width:850px;box-shadow:0 2px 8px rgba(0,0,0,.15);}
.phase-card h2{margin-top:0;margin-bottom:15px;border-bottom:2px solid #e6e8f5;padding-bottom:10px;text-align:center;}
.page{display:none;}
.page.active{display:block;}
.page h1{text-align:center;}
.page-description,
#dashboard-description{text-align:center;}
#page-dashboard{max-width:850px;margin:20px auto;}


/* PROJECT HUB - PROGRESS */
.progress-wrapper{width:100%;margin-bottom:30px;}
.progress-bar{width:100%;height:25px;background:#d5d9ec;border-radius:25px;overflow:hidden;}
.progress-fill{height:100%;width:0%;background:var(--accent-pink);transition:.3s ease;}
.progress-text{text-align:center;color:#191049;margin-top:10px;font-weight:bold;}
.progress-low{color:#999999;}
.progress-medium{color:#191049;}
.progress-high{color:#ff3366;}
.progress-complete{color:#ff3366;font-weight:bold;}
.section-progress{font-weight:bold;text-align:right;}
#dashboard h2{text-align:center;}
.dashboard-table{width:100%;border-collapse:collapse;margin-top:20px;}
.dashboard-table th,
.dashboard-table td{padding:6px;}
.dashboard-table th:first-child,
.dashboard-table td:first-child{text-align:left;}
.dashboard-table th:last-child,
.dashboard-table td:last-child{text-align:right;}

/* PROJECT HUB - TASKS */
.task-item{display:flex;flex-direction:column;padding:16px;margin-bottom:16px;background:#ffffff;border:1px solid var(--border);border-radius:var(--radius);transition:.2s;}
.task-item:hover{background:#f4f6fc;}
.task-header,
.task-description,
.task-meta,
.task-subtasks,
.task-related-section,
.task-attachments,
.task-activity-section{margin-top:16px;}
.task-header{display:flex;justify-content:space-between;align-items:flex-start;gap:15px;margin-top:0;}
.task-heading{display:flex;flex-direction:column;gap:4px;flex:1;}
.task-actions{display:flex;align-items:center;gap:10px;}
.task-key{font-size:12px;font-weight:bold;color:#777777;text-transform:uppercase;}
.task-title{font-size:16px;font-weight:600;line-height:1.4;}
.task-description{font-size:14px;line-height:1.6;color:#555555;}
.task-meta{display:flex;flex-wrap:wrap;gap:8px;font-size:12px;color:#777777;padding-top:12px;border-top:1px solid var(--border);}
.task-subtasks,
.task-related-section,
.task-attachments,
.task-activity-section{padding-top:16px;border-top:1px solid var(--border);}
.task-type,
.task-created-by,
.task-due-date{padding:2px 8px;background:#f4f6fc;border-radius:12px;}
.task-priority{font-size:12px;font-weight:bold;padding:4px 10px;border-radius:12px;background:#e6e8f5;}
.task-status{cursor:pointer;font-size:18px;width:24px;height:24px;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:.2s;}
.task-subtasks,
.task-related{display:flex;flex-direction:column;gap:6px;padding-top:8px;border-top:1px solid #e6e8f5;}
.task-parent{font-size:12px;font-weight:bold;color:#666666;margin-bottom:8px;}
.task-children{display:flex;flex-direction:column;gap:8px;}
.task-child{background:#f4f6fc;border:1px solid #d5d9ec;border-radius:6px;padding:10px;}
.task-child-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px;}
.task-child-key{font-size:11px;font-weight:bold;color:#666666;text-transform:uppercase;}
.task-child-status{font-size:16px;}
.task-child-title{font-weight:600;margin-bottom:8px;}
.task-child-footer{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:12px;color:#666666;}
.task-child-type,
.task-child-priority{background:#ffffff;padding:2px 8px;border-radius:10px;}
.related-task{background:#f4f6fc;border:1px solid #d5d9ec;border-radius:6px;padding:10px;}
.related-task-link-type{background:var(--accent-pink);color:#ffffff;padding:2px 8px;border-radius:10px;font-size:12px;font-weight:bold;}
.related-task-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px;}
.related-task-key{font-size:11px;font-weight:bold;color:#666666;text-transform:uppercase;}
.related-task-status{font-size:16px;}
.related-task-title{font-weight:600;margin-bottom:8px;}
.related-task-footer{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:12px;color:#666666;}
.related-task-type,
.related-task-priority{background:#ffffff;padding:2px 8px;border-radius:10px;}
.task-item.completed .task-title{color:var(--accent-pink);text-decoration:line-through;}
.task-status.active{transform:scale(1.15);}
.task-highlight{animation:taskHighlight2s ease;}
@keyframes taskHighlight{0%{box-shadow: 0 0 0 0 var(--accent-pink);}50%{box-shadow:0 0 15px 4px var(--accent-pink); } 100%{box-shadow: 0 0 0 0 transparent;}}
.task-related-header {display: flex;justify-content: space-between;align-items: center;margin-bottom: 10px;}
.task-add-related {padding: 4px 10px;font-size: 0.85rem;}
.task-comment{display:flex;flex-direction:column;gap:10px;margin-bottom:16px;}
.task-comment-input{min-height:80px;padding:12px;border:1px solid var(--border-color);border-radius:8px;background:var(--surface-secondary);color:var(--text-primary);font:inherit;resize:vertical;}
.task-comment-button{align-self:flex-end;}


/* TASK ACTIVITY */
.task-activity-section{margin-top:16px;padding-top:16px;border-top:1px solid var(--border-color);}
.task-activity-heading{margin:0 0 12px;font-size:0.9rem;font-weight:600;color:var(--text-muted);}
.task-activity{display:flex;flex-direction:column;gap:10px;}
.task-activity-item{padding:12px;border:1px solid var(--border-color);border-radius:8px;background:var(--surface-secondary);}
.task-activity-header{display:flex;align-items:center;gap:8px;font-weight:600;margin-bottom:6px;}
.task-activity-meta{display:flex;justify-content:space-between;font-size:0.8rem;color:var(--text-muted);margin-bottom:8px;}
.task-activity-content{white-space:pre-wrap;line-height:1.5;}


/* TASK EDITOR */
.task-editor {position: fixed;top: 50%;left: 50%;transform: translate(-50%, -50%);width: 700px;max-width: 90vw;max-height: 90vh;overflow-y: auto;background: var(--surface);border: 1px solid var(--border);border-radius: var(--radius);padding: 20px;box-shadow: 0 20px 60px rgba(0,0,0,.35);z-index: 1000;display: flex;flex-direction: column;gap: 12px;}
.task-editor input,
.task-editor textarea,
.task-editor select {width: 100%;}
.task-editor textarea {min-height: 120px;resize: vertical;}
.task-editor-buttons {display: flex;justify-content: flex-end;gap: 10px;margin-top: 10px;}
#task-editor-backdrop {display: none;position: fixed;inset: 0;background: rgba(0,0,0,.55);backdrop-filter: blur(3px);z-index: 999;}
#task-editor-backdrop.active {display: block;}


/* PROJECT HUB - STATUS MENU */
.status-menu{position:absolute;background:#ffffff;border:1px solid #d5d9ec;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,.15);min-width:220px;max-height:300px;overflow-y:auto;overflow-x:hidden;z-index:5000;animation:statusMenu .15s ease;}
.status-menu-item{padding:10px 14px;cursor:pointer;display:flex;align-items:center;gap:10px;transition:.2s;}
.status-menu-item:hover{background:#f4f6fc;}
.status-menu-item.current{background:#e6e8f5;font-weight:bold;}
.status-menu-item.current::after{content:"✓";margin-left:auto;color:var(--accent-pink);font-weight:bold;}
.status-menu-details{display:flex;flex-direction:column;}
.status-menu-icon{width:22px;text-align:center;font-size:18px;flex-shrink:0;}
.status-menu-code{font-size:11px;opacity:.6;}
@keyframes statusMenu{from{opacity:0;transform:translateY(-4px);}to{opacity:1;transform:translateY(0);}}


/* LOGIN */
.login-card{max-width:420px;margin:80px auto;padding:32px;background:var(--surface-primary);border:1px solid var(--border-color);border-radius:12px;display:flex;flex-direction:column;gap:16px;}
.login-card h1{margin:0;}
.login-card p{margin:0;color:var(--text-muted);}
.login-card form{display:flex;flex-direction:column;gap:16px;}
.login-card label{font-weight:600;}
.login-card input{padding:12px;border:1px solid var(--border-color);border-radius:8px;background:var(--surface-secondary);color:var(--text-primary);}
#login-error{min-height:20px;color:var(--accent-pink);}
