/* home.html 特有樣式 */

/* Home Layout Grid */
.home-grid {
    display: grid;
    grid-template-columns: 7fr 3fr;
    gap: 28px;
    align-items: start;
}

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.welcome-banner::after {
    content: "\f015";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: -20px;
    bottom: -30px;
    font-size: 150px;
    color: rgba(59, 130, 246, 0.05);
    pointer-events: none;
}

.welcome-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 8px;
}

.welcome-desc {
    font-size: 14px;
    color: #1e40af;
    opacity: 0.85;
}

.welcome-date {
    margin-top: 16px;
    font-size: 12px;
    font-weight: 600;
    color: #2563eb;
    background: rgba(255, 255, 255, 0.6);
    padding: 4px 10px;
    border-radius: 9999px;
    display: inline-block;
}

/* Home Cards common */
.home-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 28px;
}

.home-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-card-title i {
    color: var(--secondary);
}

/* Focus Tasks List */
.focus-task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.focus-task-item:hover {
    border-color: #cbd5e1;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.focus-task-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex: 1;
}

.focus-task-status-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.focus-task-status-btn:hover {
    border-color: var(--success);
    color: var(--success);
    background-color: var(--success-light);
}

.focus-task-info {
    min-width: 0;
}

.focus-task-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.focus-task-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 12px;
}

.focus-task-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.focus-task-project {
    font-weight: 600;
    color: var(--secondary);
}

.focus-task-due.overdue {
    color: var(--danger);
    font-weight: 600;
}

/* Focus task chevron icon */
.focus-task-chevron {
    color: #cbd5e1;
    font-size: 12px;
}

/* Status check icon (hidden by default, shown on hover via JS) */
.focus-check-icon {
    font-size: 10px;
    display: none;
}

.empty-focus-tasks {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-focus-tasks i {
    font-size: 40px;
    margin-bottom: 12px;
    color: #cbd5e1;
}

/* Project Progress List */
.project-prog-item {
    margin-bottom: 20px;
}

.project-prog-item:last-child {
    margin-bottom: 0;
}

.project-prog-header {
    display: flex;
    justify-content: space-between;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 8px;
}

.project-prog-name {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.15s ease;
}

.project-prog-name:hover {
    color: var(--secondary);
}

.project-prog-pct {
    color: var(--text-muted);
}

.project-prog-bar-bg {
    height: 8px;
    background-color: var(--bg-hover);
    border-radius: 9999px;
    overflow: hidden;
}

.project-prog-bar-fill {
    height: 100%;
    background-color: var(--secondary);
    border-radius: 9999px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Right Sidebar Stats Row */
.stats-bar-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.stats-bar-item:last-child {
    margin-bottom: 0;
}

.stats-bar-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 550;
}

.stats-bar-info span {
    color: var(--text-main);
}

.stats-bar-info strong {
    color: var(--text-muted);
}

.stats-bar-bg {
    height: 8px;
    background-color: var(--bg-hover);
    border-radius: 9999px;
    overflow: hidden;
}

.stats-bar-fill {
    height: 100%;
    border-radius: 9999px;
}

/* Stats bar colour variants */
.fill-muted     { background-color: var(--text-muted); }
.fill-secondary { background-color: var(--secondary); }
.fill-success   { background-color: var(--success); }

/* Feed List */
.feed-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feed-item {
    display: flex;
    gap: 12px;
    position: relative;
}

.feed-item::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 28px;
    bottom: -16px;
    width: 1px;
    background-color: var(--border-color);
}

.feed-item:last-child::before {
    display: none;
}

.feed-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--bg-hover);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    z-index: 1;
}

/* Feed dot icon colour variants */
.feed-dot-success  { color: var(--success); }
.feed-dot-secondary { color: var(--secondary); }
.feed-dot-primary  { color: var(--primary); }
.feed-dot-danger  { color: var(--danger); }

.feed-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding-top: 3px;
}

.feed-text {
    font-size: 13px;
    color: var(--text-main);
    line-height: 1.4;
}

.feed-text strong {
    font-weight: 600;
}

.feed-task-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

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

/* Empty states */
.feed-empty,
.proj-empty {
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}

@media (max-width: 1200px) {
    .home-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .welcome-banner,
    .home-card {
        padding: 20px;
    }

    .welcome-title {
        font-size: 20px;
    }

    .focus-task-item {
        align-items: flex-start;
        gap: 12px;
    }

    .focus-task-meta {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }

    .project-prog-header,
    .stats-bar-info {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
}
