/* Goal detail overlay */
.goal-detail-sheet {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
    background: rgba(0, 0, 0, 0.72);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--motion-panel) var(--ease-standard);
    box-sizing: border-box;
}
.goal-detail-sheet[hidden] {
    display: none !important;
}
.goal-detail-sheet.open {
    opacity: 1;
    pointer-events: auto;
}
.goal-detail-sheet__panel {
    width: min(520px, 100%);
    max-height: min(560px, calc(100vh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
    overflow-y: auto;
    background: #050505;
    border: 1px solid #FFFFFF;
    border-radius: var(--card-radius-lg);
    padding: 20px 20px 28px;
    transform: scale(0.96);
    opacity: 0;
    transition: transform var(--motion-panel) cubic-bezier(0.22, 0.61, 0.36, 1),
        opacity var(--motion-panel) var(--ease-standard);
    box-sizing: border-box;
}
.goal-detail-sheet.open .goal-detail-sheet__panel {
    transform: scale(1);
    opacity: 1;
}
.goal-detail-sheet__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.goal-detail-sheet__title {
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}
.goal-detail-sheet__close {
    border: none;
    background: transparent;
    color: #B0B0B0;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}
.goal-detail-sheet__meta {
    display: grid;
    gap: 10px;
    margin: 16px 0 18px;
}
.goal-detail-sheet__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #B0B0B0;
    font-size: 14px;
    line-height: 1.5;
}
.goal-detail-sheet__row strong {
    color: #FFFFFF;
    font-weight: 500;
    text-align: right;
}
.goal-detail-sheet__description {
    color: #D8D8D8;
    font-size: 14px;
    line-height: 1.65;
    margin: 0 0 18px;
}
.goal-detail-sheet__status-button {
    width: 100%;
    min-height: var(--control-min-height);
    padding: 14px 16px;
    border-radius: var(--control-radius);
    border: 1px solid #FFFFFF;
    background: #FFFFFF;
    color: #000000;
    font-family: inherit;
    font-size: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: filter var(--motion-fast) var(--ease-standard),
        transform var(--motion-fast) var(--ease-standard);
}

.goal-detail-sheet__status-button:active {
    transform: scale(0.99);
}

/* Evening audit bottom sheet */
.audit-sheet {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 75vh;
    background: var(--panel-bg);
    border-top: 1px solid var(--divider-color);
    transition: bottom var(--motion-panel) cubic-bezier(0.1, 0.7, 0.1, 1);
    z-index: 1000;
    padding: 20px;
    display: flex;
    flex-direction: column;
}
.audit-sheet.open {
    bottom: 0;
}
.sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.sheet-close {
    font-size: 24px;
    color: var(--hint-color);
    cursor: pointer;
}
