/* Goal Tracker Card */
.goal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.goal-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

.goal-edit-btn {
    background: none;
    border: 1px solid var(--border-subtle);
    color: var(--text-tertiary);
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-body);
    letter-spacing: 0.05em;
    transition: all 0.2s;
}

.goal-edit-btn:active {
    background: var(--bg-card-elevated);
    color: var(--gold);
    border-color: var(--gold);
}

.goal-progress-container {
    margin-bottom: 12px;
}

.goal-progress-bar {
    height: 8px;
    background: var(--bg-deep);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.goal-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(90deg, var(--gold) 0%, #E8DCC4 100%);
    position: relative;
}

.goal-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.25) 50%, transparent 100%);
}

.goal-progress-fill.animate::after {
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

.goal-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.goal-amount {
    font-size: 13px;
    color: var(--text-secondary);
}

.goal-amount span {
    color: var(--gold);
    font-weight: 500;
}

.goal-status {
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.03em;
}

.goal-status.on-track {
    background: var(--positive-dim);
    color: var(--positive);
}

.goal-status.behind {
    background: var(--negative-dim);
    color: var(--negative);
}

.goal-status.achieved {
    background: var(--gold-dim);
    color: var(--gold);
}

.goal-status.ahead {
    background: rgba(59, 130, 246, 0.15);
    color: #60A5FA;
}

.goal-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.goal-modal.active {
    opacity: 1;
    visibility: visible;
}

.goal-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: 16px;
    padding: 24px;
    width: 300px;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.goal-modal.active .goal-modal-content {
    transform: scale(1);
}

.goal-modal h3 {
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--champagne);
    margin-bottom: 16px;
}

.goal-modal input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 16px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--bg-deep);
    color: var(--text-primary);
    margin-bottom: 16px;
    -webkit-appearance: none;
}

.goal-modal input[type="number"]:focus {
    outline: none;
    border-color: var(--gold);
}

.goal-modal-buttons {
    display: flex;
    gap: 10px;
}

.goal-modal-buttons button {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.goal-modal-buttons .cancel {
    background: none;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.goal-modal-buttons .save {
    background: var(--gold);
    border: none;
    color: var(--bg-deep);
}

/* Milestone Card */
.milestone-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.milestone-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(201, 169, 98, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.milestone-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.milestone-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

.milestone-content {
    display: flex;
    align-items: center;
    gap: 24px;
}

.milestone-arc-container {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.milestone-arc-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.milestone-arc-bg {
    fill: none;
    stroke: var(--bg-deep);
    stroke-width: 8;
}

.milestone-arc-progress {
    fill: none;
    stroke: url(#milestone-gradient);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.milestone-arc-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.milestone-percent {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    color: var(--champagne);
    line-height: 1;
}

.milestone-percent-label {
    font-size: 9px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 2px;
}

.milestone-details {
    flex: 1;
    min-width: 0;
}

.milestone-target {
    margin-bottom: 12px;
}

.milestone-target-label {
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.milestone-target-value {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 600;
    color: var(--champagne);
    letter-spacing: -0.01em;
}

.milestone-eta {
    display: flex;
    gap: 16px;
}

.milestone-eta-item {
    display: flex;
    flex-direction: column;
}

.milestone-eta-value {
    font-size: 15px;
    font-weight: 500;
    color: var(--gold);
}

.milestone-eta-label {
    font-size: 9px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.milestone-reached {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--positive);
    font-size: 14px;
    font-weight: 500;
}

.milestone-reached svg {
    width: 18px;
    height: 18px;
}

.milestone-unreachable {
    color: var(--text-tertiary);
    font-size: 13px;
}

.dashboard.animate .milestone-card {
    animation: fadeInUp 0.5s ease-out 0.08s forwards;
    -webkit-backface-visibility: hidden;
    opacity: 0;
}

/* Breakeven Tracker Card */
.breakeven-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.breakeven-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(201, 169, 98, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.breakeven-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.breakeven-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

.breakeven-content {
    display: flex;
    align-items: center;
    gap: 24px;
}

.breakeven-arc-container {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.breakeven-arc-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.breakeven-arc-bg {
    fill: none;
    stroke: var(--bg-deep);
    stroke-width: 8;
}

.breakeven-arc-progress {
    fill: none;
    stroke: url(#breakeven-gradient);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.breakeven-arc-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.breakeven-percent {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    color: var(--champagne);
    line-height: 1;
}

.breakeven-percent-label {
    font-size: 9px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 2px;
}

.breakeven-details {
    flex: 1;
    min-width: 0;
}

.breakeven-target {
    margin-bottom: 12px;
}

.breakeven-target-label {
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.breakeven-target-value {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 600;
    color: var(--champagne);
    letter-spacing: -0.01em;
}

.breakeven-stats {
    display: flex;
    gap: 16px;
}

.breakeven-stat-item {
    display: flex;
    flex-direction: column;
}

.breakeven-stat-value {
    font-size: 15px;
    font-weight: 500;
    color: var(--gold);
}

.breakeven-stat-value.positive {
    color: var(--positive);
}

.breakeven-stat-label {
    font-size: 9px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.breakeven-reached {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--positive);
    font-size: 14px;
    font-weight: 500;
}

.breakeven-reached svg {
    width: 18px;
    height: 18px;
}

.dashboard.animate .breakeven-card {
    animation: fadeInUp 0.5s ease-out 0.1s forwards;
    -webkit-backface-visibility: hidden;
    opacity: 0;
}
