.home-hero {
    background: linear-gradient(135deg, rgba(240, 247, 255, 0.96) 0%, rgba(255, 255, 255, 0.98) 48%, rgba(247, 250, 253, 0.96) 100%);
    border: 1px solid #d3dfeb;
    border-radius: 12px;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    overflow: hidden;
    padding: 1.5rem;
}

.home-hero-media img {
    border-radius: 10px;
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.home-hero-content {
    align-self: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.75rem 0;
}

.home-eyebrow {
    color: #2c6fb2;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.home-hero-content h1 {
    color: #1f2937;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.02;
    margin: 0;
}

.home-hero-content p {
    color: #66758a;
    font-size: 1rem;
    margin: 0;
    max-width: 38rem;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.home-dashboard {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.home-overview {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-overview-card {
    background: linear-gradient(180deg, rgba(244, 249, 255, 0.96) 0%, rgba(255, 255, 255, 0.98) 100%);
    border: 1px solid #d4dfeb;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-height: 112px;
    padding: 1rem 1.1rem;
    position: relative;
}

.home-overview-card::before {
    background: linear-gradient(180deg, #4f89c3 0%, #2c6fb2 100%);
    border-radius: 999px;
    content: "";
    height: 32px;
    position: absolute;
    right: 1rem;
    top: 1rem;
    width: 4px;
}

.home-overview-label {
    color: #6b7b8f;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.home-overview-card strong {
    color: #1f2937;
    font-size: 1.2rem;
}

.home-overview-meta,
.home-overview-meta a {
    color: #617286;
    font-size: 0.92rem;
}

.home-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
}

.home-primary-column,
.home-secondary-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.home-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(249, 252, 255, 0.95) 100%);
    border: 1px solid #d4dfeb;
    border-radius: 12px;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.05);
    padding: 1.1rem;
}

.home-panel-header {
    align-items: flex-start;
    background: linear-gradient(180deg, #f4f9ff 0%, #edf4fb 100%);
    border: 1px solid #d8e4ef;
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0.85rem 0.95rem;
    position: relative;
}

.home-panel-header::before {
    background: linear-gradient(180deg, #4f89c3 0%, #2c6fb2 100%);
    border-radius: 999px;
    content: "";
    height: calc(100% - 1rem);
    left: 0.55rem;
    position: absolute;
    top: 0.5rem;
    width: 4px;
}

.home-panel-header h2 {
    color: #183755;
    font-size: 1.22rem;
    font-weight: 700;
    margin: 0 0 0.2rem;
    padding-left: 0.55rem;
}

.home-panel-header p {
    color: #60758f;
    margin: 0;
    padding-left: 0.55rem;
}

.home-task-form,
.home-favourites,
.home-recent-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.home-favourite-card,
.home-current-card,
.home-recent-card {
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8fc 100%);
    border: 1px solid #dbe5ef;
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    padding: 0.95rem;
}

.home-favourite-card {
    align-items: center;
    display: grid;
    gap: 0.9rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto;
}

.home-favourite-copy {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.home-favourite-copy strong,
.home-current-title strong,
.home-recent-title strong {
    color: #1f2937;
    font-size: 1rem;
}

.home-favourite-copy span,
.home-current-title span,
.home-recent-title span {
    color: #66758a;
    font-size: 0.92rem;
}

.home-favourite-input {
    min-width: 0;
}

.home-status-pill {
    background: linear-gradient(180deg, #edf8f0 0%, #dff0e4 100%);
    border: 1px solid #c1deca;
    border-radius: 999px;
    color: #2f6b47;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.7rem;
}

.home-current-title,
.home-recent-title {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 1rem;
}

.home-task-title-row {
    align-items: flex-start;
    display: flex;
    gap: 0.65rem;
    min-width: 0;
}

.home-task-title-row .tasks-color-indicator {
    margin-top: 0.2rem;
}

.home-task-title-row .home-current-title,
.home-task-title-row .home-recent-title {
    margin-bottom: 1rem;
    min-width: 0;
}

.home-detail-list {
    column-gap: 1rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    row-gap: 0.9rem;
}

.home-detail-list.compact {
    row-gap: 0.75rem;
}

.home-detail-list div {
    min-width: 0;
}

.home-detail-list .wide {
    grid-column: 1 / -1;
}

.home-detail-list dt {
    color: #6a7a8e;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.18rem;
    text-transform: uppercase;
}

.home-detail-list dd {
    color: #253244;
    margin: 0;
}

.home-current-actions,
.home-recent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.home-recent-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 0.9rem;
}

.home-star-toggle {
    color: #5c7390;
    font-size: 1.05rem;
    line-height: 1;
}

.home-star-toggle:hover {
    color: #1f2937;
}

.home-empty-state {
    background: linear-gradient(180deg, #fbfdff 0%, #f5f9fd 100%);
    border: 1px dashed #cdd9e6;
    border-radius: 10px;
    color: #657588;
    padding: 1rem;
}

html[data-theme="dark"] .home-hero,
html[data-theme="dark"] .home-overview-card,
html[data-theme="dark"] .home-panel,
html[data-theme="dark"] .home-favourite-card,
html[data-theme="dark"] .home-current-card,
html[data-theme="dark"] .home-recent-card,
html[data-theme="dark"] .home-empty-state {
    border-color: var(--app-border);
    color: var(--app-text);
}

html[data-theme="dark"] .home-hero,
html[data-theme="dark"] .home-panel {
    background: linear-gradient(180deg, rgba(22, 34, 48, 0.98) 0%, rgba(18, 29, 41, 0.96) 100%);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .home-overview-card,
html[data-theme="dark"] .home-favourite-card,
html[data-theme="dark"] .home-current-card,
html[data-theme="dark"] .home-recent-card {
    background: linear-gradient(180deg, #1b2a3a 0%, #142130 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 20px rgba(0, 0, 0, 0.16);
}

html[data-theme="dark"] .home-panel-header {
    background: linear-gradient(180deg, #203246 0%, #19283a 100%);
    border-color: var(--app-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .home-overview-card::before,
html[data-theme="dark"] .home-panel-header::before {
    background: linear-gradient(180deg, #83c5ff 0%, #3e91da 100%);
}

html[data-theme="dark"] .home-eyebrow,
html[data-theme="dark"] .home-overview-label,
html[data-theme="dark"] .home-detail-list dt {
    color: var(--app-accent-strong);
}

html[data-theme="dark"] .home-hero-content h1,
html[data-theme="dark"] .home-overview-card strong,
html[data-theme="dark"] .home-panel-header h2,
html[data-theme="dark"] .home-favourite-copy strong,
html[data-theme="dark"] .home-current-title strong,
html[data-theme="dark"] .home-recent-title strong,
html[data-theme="dark"] .home-detail-list dd {
    color: var(--app-text);
}

html[data-theme="dark"] .home-hero-content p,
html[data-theme="dark"] .home-overview-meta,
html[data-theme="dark"] .home-overview-meta a,
html[data-theme="dark"] .home-panel-header p,
html[data-theme="dark"] .home-favourite-copy span,
html[data-theme="dark"] .home-current-title span,
html[data-theme="dark"] .home-recent-title span {
    color: var(--app-text-muted);
}

html[data-theme="dark"] .home-overview-meta a:hover {
    color: var(--app-accent-strong);
}

html[data-theme="dark"] .home-empty-state {
    background: rgba(17, 27, 38, 0.76);
    border-color: var(--app-border-strong);
    color: var(--app-text-muted);
}

html[data-theme="dark"] .home-status-pill {
    background: linear-gradient(180deg, rgba(35, 197, 94, 0.18) 0%, rgba(22, 163, 74, 0.14) 100%);
    border-color: rgba(74, 222, 128, 0.35);
    color: #9ae6b4;
}

html[data-theme="dark"] .home-star-toggle {
    color: var(--app-text-muted);
}

html[data-theme="dark"] .home-star-toggle:hover {
    color: var(--app-text);
}

@media (max-width: 1199.98px) {
    .home-grid {
        grid-template-columns: 1fr;
    }

    .home-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .home-hero {
        grid-template-columns: 1fr;
    }

    .home-favourite-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .home-overview {
        grid-template-columns: 1fr;
    }

    .home-panel,
    .home-hero {
        padding: 1rem;
    }

    .home-detail-list {
        grid-template-columns: 1fr;
    }

    .home-current-actions,
    .home-recent-actions,
    .home-hero-actions {
        flex-direction: column;
    }

    .home-current-actions .btn,
    .home-recent-actions .btn,
    .home-hero-actions .btn {
        width: 100%;
    }
}
