/* ============================================================
   Donation Tracker Styles
   ============================================================ */

.tracker-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--dsh-dark, #1a1a1a);
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px;
    box-sizing: border-box;
}

.tracker-wrapper * {
    box-sizing: border-box;
}

/* ---- Card ---- */
.tracker-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--dsh-border, #e5e5e5);
    padding: 32px;
    position: relative;
}

/* ---- Header ---- */
.tracker-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    gap: 16px;
}

.tracker-title-group {
    flex: 1;
}

.tracker-eyebrow {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--dsh-primary, #c12831);
    margin: 0 0 6px 0;
    display: block;
}

.tracker-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--dsh-dark, #1a1a1a);
    margin: 0;
    line-height: 1.2;
}

.tracker-header-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    align-items: center;
}

.tracker-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--dsh-border, #e5e5e5);
    background: var(--dsh-bg-light, #f8f8f8);
    color: var(--dsh-text-light, #666);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.tracker-icon-btn i {
    color: var(--dsh-text-light, #666);
    transition: color 0.2s ease;
}

.tracker-icon-btn:hover {
    background: var(--dsh-primary, #c12831) !important;
    border-color: var(--dsh-primary, #c12831) !important;
    color: #ffffff !important;
}

.tracker-icon-btn:hover i {
    color: #ffffff !important;
}

/* ---- Amount Display ---- */
.tracker-amount-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tracker-amount-current {
    font-size: 56px;
    font-weight: 800;
    line-height: 1;
    background: var(--dsh-charity-gradient, linear-gradient(135deg, #c12831 0%, #d4a853 100%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tracker-amount-goal {
    font-size: 20px;
    font-weight: 600;
    color: var(--dsh-text-light, #666);
}

.tracker-amount-pct {
    font-size: 14px;
    font-weight: 700;
    color: var(--dsh-primary, #c12831);
    background: rgba(193, 40, 49, 0.08);
    padding: 4px 10px;
    border-radius: 20px;
    margin-left: auto;
    align-self: center;
}

/* ---- Progress Bar ---- */
.tracker-bar-container {
    position: relative;
    height: 20px;
    background: var(--dsh-bg-light, #f8f8f8);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 28px;
    border: 1px solid var(--dsh-border, #e5e5e5);
}

.tracker-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 100px;
    background: var(--dsh-charity-gradient, linear-gradient(135deg, #c12831 0%, #d4a853 100%));
    position: relative;
    transition: width 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
}

.tracker-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: trackerBarShimmer 2.2s ease-in-out infinite;
}

@keyframes trackerBarShimmer {
    0%   { left: -60%; }
    100% { left: 160%; }
}

/* ---- Stats Row ---- */
.tracker-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.tracker-stat-card {
    flex: 1;
    min-width: 120px;
    background: var(--dsh-bg-light, #f8f8f8);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid var(--dsh-border, #e5e5e5);
}

.tracker-stat-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--dsh-text-light, #666);
    margin: 0 0 6px 0;
    display: block;
}

.tracker-stat-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--dsh-dark, #1a1a1a);
    margin: 0;
}

/* ---- Donation List ---- */
.tracker-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.tracker-list-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--dsh-text-light, #666);
    margin: 0;
}

.tracker-list-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--dsh-border, #e5e5e5);
    background: #ffffff;
    color: var(--dsh-dark, #1a1a1a);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tracker-list-add-btn i {
    font-size: 11px;
    color: var(--dsh-primary, #c12831);
}

.tracker-list-add-btn:hover {
    border-color: var(--dsh-primary, #c12831);
    color: var(--dsh-primary, #c12831);
    background: rgba(193, 40, 49, 0.04);
}

.tracker-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tracker-donation-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--dsh-bg-light, #f8f8f8);
    border-radius: 14px;
    border: 1px solid var(--dsh-border, #e5e5e5);
    transition: opacity 0.3s ease, background 0.2s ease;
}

.tracker-donation-item.is-hidden {
    opacity: 0.45;
    background: #f0f0f0;
}

.tracker-donation-item.is-new {
    animation: trackerItemFadeIn 0.5s ease-out;
}

@keyframes trackerItemFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tracker-donation-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(193, 40, 49, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--dsh-primary, #c12831);
}

.tracker-donation-icon i {
    font-size: 16px;
}

.tracker-donation-info {
    flex: 1;
    min-width: 0;
}

.tracker-donation-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--dsh-dark, #1a1a1a);
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tracker-donation-meta {
    font-size: 12px;
    color: var(--dsh-text-light, #666);
    margin: 0;
}

.tracker-donation-amount {
    font-size: 18px;
    font-weight: 800;
    color: var(--dsh-dark, #1a1a1a);
    flex-shrink: 0;
}

.tracker-donation-item.is-hidden .tracker-donation-amount {
    color: var(--dsh-text-light, #666);
    text-decoration: line-through;
}

/* ---- Toggle Switch ---- */
.tracker-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

.tracker-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.tracker-toggle-slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #d0d0d0;
    border-radius: 100px;
    transition: background 0.25s ease;
}

.tracker-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    top: 3px;
    left: 3px;
    transition: transform 0.25s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.tracker-toggle input:checked + .tracker-toggle-slider {
    background: var(--dsh-primary, #c12831);
}

.tracker-toggle input:checked + .tracker-toggle-slider::before {
    transform: translateX(20px);
}

/* ---- Initial Loading ---- */
.tracker-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 20px;
}

.tracker-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(193, 40, 49, 0.15);
    border-top-color: var(--dsh-primary, #c12831);
    border-radius: 50%;
    animation: trackerSpin 0.8s linear infinite;
}

@keyframes trackerSpin {
    to { transform: rotate(360deg); }
}

.tracker-loading-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--dsh-text-light, #666);
}

/* ---- Empty State ---- */
.tracker-empty {
    text-align: center;
    padding: 32px;
    color: var(--dsh-text-light, #666);
    font-size: 14px;
}

/* ============================================================
   FULLSCREEN PRESENTATION MODE — Angular / Big Screen
   ============================================================ */

.tracker-wrapper.is-fullscreen,
.tracker-wrapper:fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    background: #f0f2f5 !important;
    z-index: 999999 !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    border-radius: 0 !important;
}

/* Card: fills whole screen, no border, no radius */
.tracker-wrapper.is-fullscreen .tracker-card,
.tracker-wrapper:fullscreen .tracker-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 44px 60px 52px !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Hide stats, list, empty, and pct from amount-row (it gets moved into bar) */
.tracker-wrapper.is-fullscreen .tracker-stats,
.tracker-wrapper:fullscreen .tracker-stats,
.tracker-wrapper.is-fullscreen .tracker-list-header,
.tracker-wrapper:fullscreen .tracker-list-header,
.tracker-wrapper.is-fullscreen .tracker-list,
.tracker-wrapper:fullscreen .tracker-list,
.tracker-wrapper.is-fullscreen .tracker-empty,
.tracker-wrapper:fullscreen .tracker-empty {
    display: none !important;
}

/* Hide pct from amount-row — it lives inside the bar in fullscreen */
.tracker-wrapper.is-fullscreen .tracker-amount-row .tracker-pct-display,
.tracker-wrapper:fullscreen .tracker-amount-row .tracker-pct-display {
    display: none !important;
}

/* ---- Top header row ---- */
.tracker-wrapper.is-fullscreen .tracker-header,
.tracker-wrapper:fullscreen .tracker-header {
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 0 !important;
    flex-shrink: 0 !important;
}

.tracker-wrapper.is-fullscreen .tracker-eyebrow,
.tracker-wrapper:fullscreen .tracker-eyebrow {
    font-size: 12px !important;
    letter-spacing: 4px !important;
    text-transform: uppercase !important;
    color: var(--dsh-primary, #c12831) !important;
    margin-bottom: 6px !important;
}

.tracker-wrapper.is-fullscreen .tracker-title,
.tracker-wrapper:fullscreen .tracker-title {
    color: var(--dsh-dark, #1a1a1a) !important;
    font-size: 38px !important;
    margin-top: 0 !important;
    font-weight: 800 !important;
    letter-spacing: -1px !important;
}

.tracker-wrapper.is-fullscreen .tracker-icon-btn,
.tracker-wrapper:fullscreen .tracker-icon-btn {
    background: rgba(255,255,255,0.7) !important;
    border-color: #d8d8d8 !important;
    color: var(--dsh-text-light, #888) !important;
    width: 44px !important;
    height: 44px !important;
    flex-shrink: 0 !important;
}

.tracker-wrapper.is-fullscreen .tracker-icon-btn i,
.tracker-wrapper:fullscreen .tracker-icon-btn i {
    color: var(--dsh-text-light, #888) !important;
    transition: color 0.2s ease !important;
}

.tracker-wrapper.is-fullscreen .tracker-icon-btn:hover,
.tracker-wrapper:fullscreen .tracker-icon-btn:hover {
    background: var(--dsh-primary, #c12831) !important;
    border-color: var(--dsh-primary, #c12831) !important;
}

.tracker-wrapper.is-fullscreen .tracker-icon-btn:hover i,
.tracker-wrapper:fullscreen .tracker-icon-btn:hover i {
    color: #ffffff !important;
}

/* ---- Body: bar FIRST (order 1), amounts BELOW (order 2) ---- */
.tracker-wrapper.is-fullscreen .tracker-body,
.tracker-wrapper:fullscreen .tracker-body {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    gap: 32px !important;
}

/* Bar first (visually on top) */
.tracker-wrapper.is-fullscreen .tracker-bar-container,
.tracker-wrapper:fullscreen .tracker-bar-container {
    order: 1 !important;
}

/* Amount row below the bar */
.tracker-wrapper.is-fullscreen .tracker-amount-row,
.tracker-wrapper:fullscreen .tracker-amount-row {
    order: 2 !important;
    display: flex !important;
    align-items: baseline !important;
    justify-content: center !important;
    gap: 14px !important;
    margin: 0 !important;
}

.tracker-wrapper.is-fullscreen .tracker-amount-current,
.tracker-wrapper:fullscreen .tracker-amount-current {
    font-size: 88px !important;
    line-height: 1 !important;
    font-weight: 900 !important;
    letter-spacing: -3px !important;
}

.tracker-wrapper.is-fullscreen .tracker-amount-goal,
.tracker-wrapper:fullscreen .tracker-amount-goal {
    font-size: 24px !important;
    color: var(--dsh-text-light, #999) !important;
    font-weight: 400 !important;
}

/* ---- THE HERO VERTICAL BAR — Angular, wide, with steps ---- */
.tracker-wrapper.is-fullscreen .tracker-bar-container,
.tracker-wrapper:fullscreen .tracker-bar-container {
    width: clamp(220px, 24vw, 380px) !important;
    flex: 1 !important;
    max-height: 52vh !important;
    min-height: 240px !important;
    border-radius: 0 !important;             /* Angular! */
    background: #ffffff !important;
    border: 2px solid #d8dce3 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06) !important;  /* Clean flat shadow */
    margin: 0 !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    overflow: visible !important;            /* Allow badges & labels outside bar! */
    order: 1 !important;
}

/* Step marks container */
.tracker-bar-steps {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
    overflow: visible;
}

/* Disable old static CSS gradient overlays */
.tracker-wrapper.is-fullscreen .tracker-bar-container::before,
.tracker-wrapper:fullscreen .tracker-bar-container::before,
.tracker-wrapper.is-fullscreen .tracker-bar-container::after,
.tracker-wrapper:fullscreen .tracker-bar-container::after {
    display: none !important;
}

/* ---- CLEAN BROADCAST MILESTONE MARKS (FULLSCREEN MODE) ---- */
.tracker-wrapper.is-fullscreen .tracker-step,
.tracker-wrapper:fullscreen .tracker-step {
    position: absolute;
    bottom: var(--step-pos);
    left: 0;
    right: 0;
    height: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 3;
}

.tracker-wrapper.is-fullscreen .tracker-step-line,
.tracker-wrapper:fullscreen .tracker-step-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

/* Reached Step Line — Crisp 1.5px semi-transparent white line */
.tracker-wrapper.is-fullscreen .tracker-step.is-reached .tracker-step-line,
.tracker-wrapper:fullscreen .tracker-step.is-reached .tracker-step-line {
    height: 1.5px;
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.tracker-wrapper.is-fullscreen .tracker-step.is-reached,
.tracker-wrapper:fullscreen .tracker-step.is-reached {
    z-index: 6;
}

/* Left Milestone Amount Label — OUTSIDE the bar to the left */
.tracker-wrapper.is-fullscreen .tracker-step-left-label,
.tracker-wrapper:fullscreen .tracker-step-left-label {
    position: absolute;
    right: calc(100% + 16px);
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 700;
    color: #777788;
    transition: all 0.4s ease;
    z-index: 5;
    white-space: nowrap;
    text-align: right;
}

.tracker-wrapper.is-fullscreen .tracker-step.is-reached .tracker-step-left-label,
.tracker-wrapper:fullscreen .tracker-step.is-reached .tracker-step-left-label {
    color: var(--dsh-dark, #1a1a1a);
    font-weight: 800;
    font-size: 15px;
}

/* Right Milestone Badge Container — OUTSIDE the bar to the right */
.tracker-wrapper.is-fullscreen .tracker-step-badge,
.tracker-wrapper:fullscreen .tracker-step-badge {
    position: absolute;
    left: calc(100% + 16px);
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(210, 210, 220, 0.8);
    color: #777788;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    z-index: 5;
    white-space: nowrap;
}

/* REACHED Badge Styling — Pure solid white pill with green checkmark */
.tracker-wrapper.is-fullscreen .tracker-step.is-reached .tracker-step-badge,
.tracker-wrapper:fullscreen .tracker-step.is-reached .tracker-step-badge {
    background: #ffffff;
    border: 1.5px solid #16a34a;
    color: var(--dsh-dark, #1a1a1a);
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.18), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.tracker-step-check {
    display: none;
    color: #16a34a;
    font-size: 12px;
}

.tracker-step-star {
    display: none;
    color: #d4a853;
    font-size: 12px;
}

.tracker-step.is-reached .tracker-step-check,
.tracker-step.is-reached .tracker-step-star {
    display: inline-block;
}

/* Normal (Horizontal) Mode Step Items */
.tracker-wrapper:not(.is-fullscreen) .tracker-step {
    position: absolute;
    left: var(--step-pos);
    top: 0;
    bottom: 0;
    width: 0;
    z-index: 3;
}

.tracker-wrapper:not(.is-fullscreen) .tracker-step-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    background: rgba(0, 0, 0, 0.12);
    transition: all 0.4s ease;
}

.tracker-wrapper:not(.is-fullscreen) .tracker-step.is-reached .tracker-step-line {
    background: #ffffff;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
}

.tracker-wrapper:not(.is-fullscreen) .tracker-step-left-label,
.tracker-wrapper:not(.is-fullscreen) .tracker-step-badge {
    display: none;
}

/* Bar fill — angular, gradient from bottom to top */
.tracker-wrapper.is-fullscreen .tracker-bar-fill,
.tracker-wrapper:fullscreen .tracker-bar-fill {
    border-radius: 0 !important;             /* Angular! */
    background: linear-gradient(to top, #c12831 0%, #d94f2e 50%, #d4a853 100%) !important;
    transition: height 1.8s cubic-bezier(0.22, 1, 0.36, 1);
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    flex-shrink: 0 !important;
    z-index: 1 !important;
    box-shadow: 0 -2px 20px rgba(193, 40, 49, 0.3) !important;
    overflow: hidden !important;
}

/* Clean sharp top edge line on bar fill */
.tracker-wrapper.is-fullscreen .tracker-bar-fill::before,
.tracker-wrapper:fullscreen .tracker-bar-fill::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 2px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
    z-index: 3 !important;
}

/* Hide shimmer when bar fill is 0% */
.tracker-bar-fill[style*="height: 0%"]::after,
.tracker-bar-fill[style*="height:0%"]::after,
.tracker-bar-fill[style*="width: 0%"]::after,
.tracker-bar-fill[style*="width:0%"]::after {
    display: none !important;
}

/* Vertical shimmer on fill */
.tracker-wrapper.is-fullscreen .tracker-bar-fill::after,
.tracker-wrapper:fullscreen .tracker-bar-fill::after {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    width: 100% !important;
    height: 50% !important;
    top: 150% !important;
    background: linear-gradient(180deg,
        rgba(255,255,255,0.0) 0%,
        rgba(255,255,255,0.5) 50%,
        rgba(255,255,255,0.0) 100%) !important;
    animation: trackerBarShimmerV 2.4s ease-in-out infinite !important;
    pointer-events: none !important;
}

@keyframes trackerBarShimmerV {
    0%   { top: 150%; }
    100% { top: -60%; }
}

/* ---- Percentage: inside the bar, sticky at the top of the fill ---- */
.tracker-wrapper.is-fullscreen .tracker-bar-container .tracker-pct-display,
.tracker-wrapper:fullscreen .tracker-bar-container .tracker-pct-display {
    position: absolute !important;
    top: 12px !important;
    left: 0 !important;
    right: 0 !important;
    text-align: center !important;
    font-size: 26px !important;
    font-weight: 800 !important;
    color: var(--dsh-dark, #1a1a1a) !important;
    text-shadow: none !important;
    letter-spacing: -0.5px !important;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    z-index: 10 !important;
    display: block !important;
    pointer-events: none !important;
}

/* ============================================================
   MODAL POPUP — Manual Donation Entry
   ============================================================ */

.tracker-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: trackerModalFade 0.2s ease-out;
}

@keyframes trackerModalFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.tracker-modal-card {
    background: #ffffff;
    width: 100%;
    max-width: 440px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    animation: trackerModalPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes trackerModalPop {
    from { transform: scale(0.92); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.tracker-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--dsh-border, #e5e5e5);
}

.tracker-modal-title {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: var(--dsh-dark, #1a1a1a);
    display: flex;
    align-items: center;
}

.tracker-modal-close-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    font-size: 24px;
    line-height: 1;
    color: #999 !important;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.15s ease;
}

.tracker-modal-close-btn:hover {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--dsh-primary, #c12831) !important;
}

.tracker-modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.tracker-modal-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tracker-modal-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--dsh-text-light, #666);
}

.tracker-modal-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--dsh-border, #d8d8d8);
    font-size: 15px;
    color: var(--dsh-dark, #1a1a1a);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fbfbfb;
}

.tracker-modal-input:focus {
    border-color: var(--dsh-primary, #c12831);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(193, 40, 49, 0.12);
}

.tracker-modal-error {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #d32f2f;
    background: #ffebee;
    padding: 10px 14px;
    border-radius: 10px;
}

.tracker-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    background: #f9fafb;
    border-top: 1px solid var(--dsh-border, #e5e5e5);
}

.tracker-modal-cancel-btn {
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid #d0d0d0;
    background: #ffffff;
    color: #555;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tracker-modal-cancel-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.tracker-modal-submit-btn {
    padding: 10px 22px;
    border-radius: 10px;
    border: none;
    background: var(--dsh-primary, #c12831);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(193, 40, 49, 0.25);
}

.tracker-modal-submit-btn:hover {
    background: #a81e26;
    box-shadow: 0 6px 16px rgba(193, 40, 49, 0.35);
}

.tracker-modal-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
