/* Goals page only. Loaded after the inline sheet in goals.html. */

body {
    background: #0B0F17;
}

.header-left h1,
.header-left h1 span {
    color: #E8ECF4;
    text-shadow: none;
}

.page-title-box h2 {
    background: none;
    color: #E8ECF4;
    -webkit-text-fill-color: #E8ECF4;
    font-weight: 600;
}

.em-goals-lead {
    color: #A0AABC;
    margin: 6px 0 0;
    font-size: 15px;
}

#openAddGoalBtn.add-goal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-height: 48px;
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.38);
    background: rgba(109, 40, 217, 0.16);
    color: #E8ECF4;
    font-size: 15px;
    font-weight: 600;
    box-shadow: none;
    text-shadow: none;
}

#openAddGoalBtn.add-goal-btn:hover,
#openAddGoalBtn.add-goal-btn:active {
    background: rgba(124, 58, 237, 0.25);
    border-color: rgba(139, 92, 246, 0.5);
    color: #E8ECF4;
    transform: none;
    filter: none;
    box-shadow: none;
}

.em-goal-plus,
.em-goal-cat,
.em-goal-x,
.em-goal-action {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.em-goal-plus {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    stroke: #B69AFB;
}

.em-goal-cat {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.em-goal-cat--week {
    stroke: #C4B5FD;
    filter: drop-shadow(0 0 6px rgba(196, 181, 253, 0.28));
}

.em-goal-cat--month {
    stroke: #B69AFB;
    filter: drop-shadow(0 0 6px rgba(182, 154, 251, 0.28));
}

.em-goal-cat--year {
    stroke: #A5B4FC;
    filter: drop-shadow(0 0 6px rgba(165, 180, 252, 0.28));
}

.section-title {
    color: #E8ECF4;
    font-size: 20px;
    font-weight: 600;
    gap: 8px;
}

.roadmap-wrapper::before {
    width: 2px;
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.55) 0%, rgba(139, 92, 246, 0.25) 55%, transparent 100%);
    box-shadow: none;
}

.section-header::before {
    background: #151B27;
    border: 2px solid rgba(139, 92, 246, 0.55);
    box-shadow: none;
}

.section-badge {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #E8ECF4;
    background: rgba(109, 40, 217, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.35);
}

.main-container .goal-card {
    background: #151B27;
    border: 1px solid #252D3B;
    border-radius: 16px;
    box-shadow: none;
    backdrop-filter: none;
}

.main-container .goal-card::before {
    content: none;
}

.main-container .goal-card:hover {
    transform: none;
    border-color: rgba(139, 92, 246, 0.35);
    box-shadow: none;
    background: #151B27;
}

.main-container .goal-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #E8ECF4;
    font-weight: 600;
}

.em-goal-complete-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    fill: none;
    stroke: #34D399;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 6px rgba(52, 211, 153, 0.28));
}

.main-container .task-checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    margin: 0;
    flex: 0 0 20px;
    border: none;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='3' rx='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px;
    box-shadow: none;
    cursor: default;
}

.main-container .task-checkbox-label input[type="checkbox"]:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334D399' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
    filter: drop-shadow(0 0 5px rgba(52, 211, 153, 0.28));
}

.main-container .goal-actions {
    opacity: 1;
}

.main-container .icon-btn {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #A0AABC;
    padding: 0;
}

.main-container .icon-btn.edit:hover {
    background: rgba(124, 58, 237, 0.12);
    color: #C4B5FD;
    transform: none;
}

.main-container .icon-btn.delete:hover,
.main-container .icon-btn.delete:focus-visible {
    background: rgba(248, 113, 113, 0.12);
    color: #F87171;
    transform: none;
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.12);
}

.main-container .icon-btn.delete:focus-visible {
    outline: 2px solid rgba(248, 113, 113, 0.55);
    outline-offset: 2px;
}

.em-goal-action {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

#goalModal.cyber-modal-overlay {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

#goalModal .cyber-modal-box {
    background: #151B27;
    border: 1px solid #252D3B;
    border-radius: 16px;
    padding: 24px 24px 20px;
    max-height: min(640px, calc(100vh - 48px));
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    transform: none;
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 58, 237, 0.45) transparent;
}

#goalModal .cyber-modal-box::before,
#deleteGoalModal .cyber-modal-box::before {
    content: none;
    display: none;
}

#goalModal .cyber-modal-box::-webkit-scrollbar {
    width: 6px;
}

#goalModal .cyber-modal-box::-webkit-scrollbar-track {
    background: transparent;
}

#goalModal .cyber-modal-box::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.45);
    border-radius: 999px;
}

#goalModal .modal-header h3,
#goalModalTitle {
    color: #E8ECF4;
    font-size: 22px;
    font-weight: 600;
}

#goalModal .input-group {
    margin-bottom: 16px;
}

.em-goal-note {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: #A0AABC;
}

#goalModal .input-group label {
    color: #A0AABC;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: none;
}

#goalModal .cyber-input,
#goalModal .cyber-select,
#goalTasksInput {
    background: #0D1119;
    border: 1px solid #252D3B;
    color: #E8ECF4;
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: none;
}

#goalModal .cyber-input::placeholder {
    color: rgba(160, 170, 188, 0.7);
}

#goalModal .cyber-input:focus,
#goalModal .cyber-select:focus {
    border-color: rgba(139, 92, 246, 0.55);
    box-shadow: none;
    background: #0D1119;
    outline: none;
}

#closeGoalModal.close-modal-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #A0AABC;
    font-size: 0;
}

.em-goal-x {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

#closeGoalModal.close-modal-btn:hover {
    color: #F87171;
    background: rgba(239, 68, 68, 0.12);
    transform: none;
}

#goalModal .modal-actions {
    gap: 12px;
    margin-top: 20px;
}

#cancelGoalBtn.btn-cyber-cancel,
#saveGoalBtn.btn-cyber-save {
    min-height: 44px;
    border-radius: 12px;
    font-weight: 600;
    transform: none;
    box-shadow: none;
}

#cancelGoalBtn.btn-cyber-cancel {
    background: transparent;
    border: 1px solid #252D3B;
    color: #A0AABC;
}

#cancelGoalBtn.btn-cyber-cancel:hover {
    background: rgba(148, 163, 184, 0.08);
    transform: none;
}

#saveGoalBtn.btn-cyber-save {
    min-height: 48px;
    background: rgba(109, 40, 217, 0.16);
    border: 1px solid rgba(139, 92, 246, 0.38);
    color: #E8ECF4;
}

#saveGoalBtn.btn-cyber-save:hover {
    background: rgba(124, 58, 237, 0.25);
    transform: none;
    box-shadow: none;
}

#deleteGoalModal .em-delete-box {
    background: #151B27;
    border: 1px solid #252D3B;
    padding: 24px;
    border-radius: 16px;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.em-delete-title {
    color: #EF4444;
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 600;
}

.em-delete-copy {
    margin: 0 0 24px;
    font-size: 15px;
    color: #A0AABC;
    line-height: 1.5;
}

.em-delete-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.em-delete-cancel,
.em-delete-confirm {
    flex: 1;
    min-height: 44px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

.em-delete-cancel {
    background: transparent;
    border: 1px solid #252D3B;
    color: #A0AABC;
}

.em-delete-confirm {
    background: #DC3B3B;
    border: 1px solid rgba(220, 59, 59, 0.4);
    color: #FFFFFF;
}

.em-delete-confirm:hover {
    background: #EF4444;
}

body.light-mode {
    background: #F1F5F9;
}

body.light-mode .main-container .task-checkbox-label input[type="checkbox"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='3' rx='2'/%3E%3C/svg%3E");
}

body.light-mode .header-left h1,
body.light-mode .header-left h1 span,
body.light-mode .page-title-box h2,
body.light-mode .section-title,
body.light-mode .main-container .goal-title,
body.light-mode #goalModal .modal-header h3,
body.light-mode .section-badge {
    color: #0F172A;
    -webkit-text-fill-color: #0F172A;
}

body.light-mode .em-goals-lead,
body.light-mode #goalModal .input-group label,
body.light-mode .em-delete-copy,
body.light-mode .em-goal-note {
    color: #64748B;
}

body.light-mode #openAddGoalBtn.add-goal-btn {
    background: rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.28);
    color: #1E293B;
}

body.light-mode .em-goal-plus,
body.light-mode .em-goal-cat {
    stroke: #7C3AED;
    filter: none;
}

body.light-mode .section-header::before,
body.light-mode .main-container .goal-card,
body.light-mode .main-container .goal-card:hover,
body.light-mode #goalModal .cyber-modal-box,
body.light-mode #deleteGoalModal .em-delete-box {
    background: #F8F9FC;
    border-color: #E2E6EE;
}

body.light-mode #goalModal .cyber-input,
body.light-mode #goalModal .cyber-select {
    background: #FFFFFF;
    border-color: #D5DBE6;
    color: #0F172A;
}

body.light-mode .section-badge {
    background: rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.22);
}

@media (max-width: 768px) {
    .goals-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .page-title-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    #openAddGoalBtn.add-goal-btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .em-goal-cat,
    .roadmap-section,
    .main-container .task-checkbox-label input[type="checkbox"]:checked {
        filter: none;
        animation: none;
    }
}
