/* Kronker Due - Professional Design */
:root {
    --spacing-unit: 12px; /* Yellow band spacing unit - applied consistently throughout */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Remove focus outlines on clickable elements only */
button,
[onclick],
.history-label,
.today-label,
.deadline-card,
.add-card,
.add-btn,
.mic-btn {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    outline: none !important;
    border: none !important;
}

*:focus,
*:focus-visible,
*:active,
*:-webkit-any-link:focus,
button:focus,
span:focus,
div:focus,
.history-label:focus,
[onclick]:focus,
.timeline-labels:focus,
.timeline-labels span:focus,
.add-btn:focus,
.add-btn:focus-visible,
.add-btn:active,
.mic-btn:focus,
.mic-btn:focus-visible,
.mic-btn:active {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

body {
    background: #1a1a1a;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

/* Header container - part of the platform frame */
.header-container {
    background: #1a1a1a;
    padding: 40px 0 20px 0;
    margin-bottom: 0;
}

/* Main content area - deep black background for cards */
.main-content {
    background: #000000;
    margin: 0 40px 40px 40px;
    padding: 0 20px 40px 20px;
    border-radius: 0 0 12px 12px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
    min-height: calc(100vh - 200px);
    overflow: hidden;
    position: relative;
    border: none;
    border-top: none;
    outline: none;
}

/* Header - logo and gear positioning */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    padding: 0 42px; /* Adjusted to 42px for refined logo positioning */
    padding-bottom: 0;
    border-bottom: none;
}

/* Timeline header with balanced spacing above and below date */
.timeline-header {
    position: relative;
    padding: calc(var(--spacing-unit) * 2.5) var(--spacing-unit) calc(var(--spacing-unit) * 2.5) var(--spacing-unit); /* Match grid padding for alignment */
    margin: calc(var(--spacing-unit) * 4) 0 0 0;
    background: #000000;
    border: none;
    border-bottom: none;
    border-top: none;
}

/* Archive header with dotted line - tighter spacing above and below "ARCHIVE" */
.archive-header {
    position: relative;
    padding: calc(var(--spacing-unit) * 2.5) 36px 0 36px; /* Remove all bottom padding */
    margin: calc(var(--spacing-unit) * 1) 0 0 0; /* Reduced from 4 to 1 - less space above ARCHIVE */
    background: #000000;
    border: none;
    border-bottom: none;
    border-top: none;
}

/* Dotted lines removed for cleaner design */

.timeline-labels {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center; /* Center align for proper horizontal alignment */
    height: auto;
    margin-bottom: 0;
    z-index: 10000;
    width: 100%;
    border: none;
    border-bottom: none;
    border-top: none;
    padding-bottom: 0; /* Eliminated padding-bottom completely */
}

.archive-labels {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: baseline; /* Align text to green baseline */
    height: auto;
    margin-bottom: 0;
    z-index: 2;
    width: 100%;
    border: none;
    border-bottom: none;
    border-top: none;
    padding-bottom: 0;
}

.today-label {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px; /* Match history label letter spacing */
    background: #000000;
    padding: 0 15px 0 0; /* Remove padding to align with card edge accounting for timeline-header padding */
    flex-shrink: 0;
    cursor: pointer;
    transition: color 0.3s ease;
}

.today-label:hover {
    color: rgba(255, 255, 255, 1);
}

/* Archive view state - current date muted, HISTORY focused */
.archive-open .today-label {
    color: rgba(255, 255, 255, 0.3);
}

.archive-open .today-label:hover {
    color: rgba(255, 255, 255, 0.6);
}

.archive-open .history-label {
    color: rgba(255, 255, 255, 0.8);
}

.history-label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #000000;
    padding: 0 0 0 15px; /* Remove right padding to align with card edge */
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
    cursor: pointer;
    transition: color 0.3s ease;
    outline: none;
}

.history-label:hover {
    color: rgba(255, 255, 255, 0.6);
}

.archive-label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 2px;
    background: #000000;
    padding: 0 15px 0 0;
    flex-shrink: 0;
}

.close-archive {
    color: rgba(255, 255, 255, 0.5);
    font-size: 28px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
}

.close-archive:hover {
    color: #ffffff;
}

.archive-count {
    background: transparent;
    color: #FF6B6B;
    font-size: 14px;
    font-weight: 700;
    padding: 0;
    border-radius: 0;
    min-width: auto;
    text-align: center;
    line-height: 1;
}

/* Animated sections */
.active-section {
    position: relative;
    width: 100%;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
    border: none;
    border-top: none;
}

.active-section.sliding-down {
    transform: translateY(var(--slide-distance, 400px));
}


.archive-section {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
    transform: translateY(calc(-1 * var(--slide-distance, 400px)));
    opacity: 0;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s, opacity 0.3s ease 0.3s;
    background: transparent;
    z-index: 10;
    border: 0 !important;
    border-bottom: 0 !important;
    border-top: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    overflow: visible;
    pointer-events: none; /* Don't block clicks when archive is hidden */
}

.archive-section.sliding-down {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto; /* Re-enable clicks when archive is active */
}


/* Archive pagination - fixed position under bottommost cards */
.archive-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-unit); /* 12px - yellow circle spacing unit */
    margin-top: calc(var(--spacing-unit) * 3); /* 36px - consistent spacing above pagination */
    position: relative;
    padding: var(--spacing-unit) 36px var(--spacing-unit) 36px; /* Yellow circle spacing: 12px top, 12px bottom (reduced) */
    border: none;
}

.pagination-arrow {
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    padding: 8px;
}

.pagination-arrow:hover {
    color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.pagination-arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-numbers {
    display: flex;
    gap: 8px;
    align-items: center;
}

.page-number {
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 6px 10px;
    border-radius: 6px;
    user-select: none;
    min-width: 32px;
    text-align: center;
}

.page-number:hover {
    color: rgba(255, 255, 255, 1);
    background: rgba(255, 255, 255, 0.1);
}

.page-number.current {
    color: #ffffff;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.15);
}

.section-content {
    padding: 0;
}

/* Ensure archive grid matches active grid */
#archiveGrid {
    display: grid;
    gap: calc(var(--spacing-unit) * 2); /* 24px - consistent card gaps using yellow circle spacing */
    padding: calc(var(--spacing-unit) * 4) 36px calc(var(--spacing-unit) * 1) 36px; /* 4 yellow dots top padding, 12px bottom */
    justify-content: center;
    border: none;
    border-bottom: none;
}

/* Archive cards styling - all gray */
.deadline-card.archived {
    background: rgba(26, 26, 26, 0.9) !important;
    border: 1px solid rgba(158, 158, 158, 0.3) !important;
    border-bottom: 1px solid rgba(158, 158, 158, 0.3) !important;
    opacity: 0.7;
}

.deadline-card.archived .card-amount {
    color: #9E9E9E !important;
}

.deadline-card.archived .card-name {
    color: rgba(255, 255, 255, 0.6) !important;
}

.deadline-card.archived .card-date {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* Archive cards styling - gray out completed/archived items */
.deadline-card.archived {
    background: rgba(26, 26, 26, 0.9) !important;
    border: 1px solid rgba(158, 158, 158, 0.3) !important;
    opacity: 0.7 !important;
}

.deadline-card.archived .card-amount {
    color: #9E9E9E !important;
}

.deadline-card.archived .card-name {
    color: rgba(255, 255, 255, 0.6) !important;
}

.deadline-card.archived .card-date {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* Apply same responsive grid rules to archive */
/* MOBILE: 1 column ≤ 768px */
@media (max-width: 768px) {
    #archiveGrid {
        grid-template-columns: 1fr;
        margin: 0 auto;
    }
}

/* TABLET: 2 columns 769px - 1199px */
@media (min-width: 769px) and (max-width: 1199px) {
    #archiveGrid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
        max-width: 900px;
        margin: 0 auto;
    }
}

/* DESKTOP: 3 columns ≥ 1200px */
@media (min-width: 1200px) {
    #archiveGrid {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
        max-width: 1400px;
        margin: 0 auto;
        padding-bottom: 0; /* Remove bottom padding to bring pagination closer */
    }
    
    .archive-pagination {
        margin-top: calc(var(--spacing-unit) * 3); /* Consistent positioning */
        padding-top: 0;
    }
}

/* LARGE DESKTOP: 4+ columns ≥ 1600px */
@media (min-width: 1600px) {
    #archiveGrid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 36px;
        max-width: 1800px;
        margin: 0 auto;
        padding-bottom: 0; /* Remove bottom padding to bring pagination closer */
    }
    
    .archive-pagination {
        margin-top: calc(var(--spacing-unit) * 3); /* Consistent positioning */
        padding-top: 0;
    }
}

.logo-section {
    display: flex;
    align-items: center;
}

.logo-section img {
    filter: drop-shadow(0 2px 8px rgba(76, 175, 80, 0.3));
}

.header-buttons {
    display: flex;
    gap: 12px;
    position: relative;
}

.gear-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gear-btn:hover {
    color: rgba(255, 255, 255, 0.9);
}

.gear-btn img {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
}

.gear-btn:hover img {
    transform: rotate(90deg);
}

.settings-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-section:last-of-type {
    border-bottom: none;
}

.settings-section h3 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Grid Layout - tighter spacing under timeline header */
.grid {
    display: grid;
    gap: calc(var(--spacing-unit) * 2); /* Use spacing unit for consistent gaps */
    padding: 0 var(--spacing-unit) 0 var(--spacing-unit); /* No top padding - cards directly under timeline */
    justify-content: center;
    transition: all 0.3s ease;
}

/* MOBILE: 1 column ≤ 768px */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
        margin: 0 auto;
    }
}

/* TABLET: 2 columns 769px - 1199px */
@media (min-width: 769px) and (max-width: 1199px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
        max-width: 900px;
        margin: 0 auto;
    }
}

/* DESKTOP: 3 columns ≥ 1200px */
@media (min-width: 1200px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* LARGE DESKTOP: 4+ columns ≥ 1600px */
@media (min-width: 1600px) {
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 36px;
        max-width: 1800px;
        margin: 0 auto;
    }
}

/**
 * Card Layout System
 * Ensures consistent grid layout across all card components
 * Responsive design with uniform sizing at all breakpoints
 */
.add-card, .deadline-card {
    background: rgba(26, 26, 26, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    height: 180px !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    /* Override conflicting styles for consistent grid layout */
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: 1 1 0 !important;
}

.add-card {
    border: 2px dashed rgba(255, 255, 255, 0.2) !important;
    align-items: center;
    text-align: center;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.add-card:focus,
.add-card:focus-visible,
.add-card:active {
    outline: none !important;
    border: 2px dashed rgba(255, 255, 255, 0.2) !important;
}

.add-card:hover {
    /* Remove card-level hover effects - let individual icons handle hover */
}

.add-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px; /* Increased from 16px to 32px for better thumb spacing */
}

.add-btn, .mic-btn {
    padding: 8px;
    border-radius: 8px;
    opacity: 0.6;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.add-btn:hover, .mic-btn:hover, 
.add-btn:focus, .mic-btn:focus,
.add-btn:active, .mic-btn:active {
    /* Remove all container hover effects - only images should respond */
    background: transparent !important;
    outline: none !important;
}

/* Only the images should have hover effects */
.add-btn img:hover, .mic-btn img:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Aggressively remove all focus styles from images */
.add-btn img, .mic-btn img {
    outline: none !important;
    border: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.add-btn img:focus, .add-btn img:hover, .add-btn img:active,
.mic-btn img:focus, .mic-btn img:hover, .mic-btn img:active {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes recordingPulse {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(244, 67, 54, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0);
    }
}

/* Voice Recording Modal */
#voiceModal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid rgba(244, 67, 54, 0.5);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    animation: modalSlideIn 0.3s ease;
}

.voice-modal-content {
    text-align: center;
    min-width: 300px;
}

.recording-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    font-weight: 600;
    color: #F44336;
}

.recording-dot {
    width: 12px;
    height: 12px;
    background: #F44336;
    border-radius: 50%;
    animation: recordingBlink 1s infinite;
}

@keyframes recordingBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.voice-waveform {
    display: flex;
    justify-content: center;
    align-items: end;
    gap: 4px;
    height: 40px;
    margin: 24px 0;
}

.wave-bar {
    width: 4px;
    background: linear-gradient(to top, #F44336, #FF9800);
    border-radius: 2px;
    animation: waveAnimation 1.5s ease-in-out infinite;
}

.wave-bar:nth-child(1) { animation-delay: 0s; }
.wave-bar:nth-child(2) { animation-delay: 0.1s; }
.wave-bar:nth-child(3) { animation-delay: 0.2s; }
.wave-bar:nth-child(4) { animation-delay: 0.3s; }
.wave-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes waveAnimation {
    0%, 100% { height: 8px; }
    50% { height: 32px; }
}

.voice-transcript {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 16px;
    min-height: 60px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.final-text {
    color: #2E7D32;
    font-weight: 600;
    margin-bottom: 8px;
}

.interim-text {
    color: rgba(0, 0, 0, 0.7);
    font-style: italic;
}

/* Deadline Cards */
.deadline-card {
    position: relative;
    overflow: hidden;
}

/* Remove gradient stroke effect */

.deadline-card.green {
    --accent-color: #4CAF50;
    background: rgba(26, 26, 26, 0.9);
    border: 1px solid rgba(76, 175, 80, 0.4);
    box-sizing: border-box;
}

.deadline-card.yellow {
    --accent-color: #FFC107;
    background: rgba(26, 26, 26, 0.9);
    border: 2px solid #FFC107 !important;
    box-sizing: border-box;
}

.deadline-card.orange {
    --accent-color: #FF8C00;
    background: rgba(26, 26, 26, 0.9);
    border: 3px solid rgba(255, 140, 0, 0.6) !important;
    box-sizing: border-box;
}

.deadline-card.red {
    --accent-color: #F44336;
    background: rgba(244, 67, 54, 0.25);
    border: 3px solid #F44336 !important;
    box-sizing: border-box;
}

/* ACHTUNG BABY - Due TODAY cards get full red treatment */
.deadline-card.due-today,
.deadline-card.red.due-today,
.deadline-card.due-exactly-today {
    --accent-color: #F44336;
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.15) 0%, rgba(244, 67, 54, 0.25) 100%) !important;
    border: 3px solid #F44336 !important;
    box-shadow: 0 8px 32px rgba(244, 67, 54, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    animation: dueTodayPulse 2s ease-in-out infinite;
}


/* EXTREME ACHTUNG - Overdue items get FULL RED+MAGENTA background with white text */
.deadline-card.overdue {
    --accent-color: #F44369;
    background: #F44369 !important;
    border: 3px solid #D32F5F !important;
    box-shadow: 0 12px 48px rgba(244, 67, 105, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    animation: overduePulse 1.5s ease-in-out infinite;
}

.deadline-card.overdue .card-name,
.deadline-card.overdue .card-amount,
.deadline-card.overdue .card-date,
.deadline-card.overdue .countdown-area {
    color: #ffffff !important;
}

/* Ensure completion area is positioned consistently on overdue cards */
.deadline-card.overdue .completion-area {
    margin-top: 8px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}


@keyframes dueTodayPulse {
    0%, 100% { box-shadow: 0 8px 32px rgba(244, 67, 54, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
    50% { box-shadow: 0 12px 40px rgba(244, 67, 54, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
}

@keyframes overduePulse {
    0%, 100% { 
        box-shadow: 0 12px 48px rgba(244, 67, 105, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.2);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 16px 64px rgba(244, 67, 105, 1), inset 0 1px 0 rgba(255, 255, 255, 0.3);
        transform: scale(1.02);
    }
}

.deadline-card.blue {
    --accent-color: #2196F3;
    background: rgba(26, 26, 26, 0.9);
    border: 2px solid #2196F3 !important;
    box-sizing: border-box;
}

.deadline-card.archive-blue {
    --accent-color: #9E9E9E;
    background: rgba(26, 26, 26, 0.9);
    border: 1px solid rgba(158, 158, 158, 0.4);
    box-sizing: border-box;
    opacity: 0.6;
}

/* Future autopay cards styling - dotted blue outline (override solid blue) */
.deadline-card.future-card {
    --accent-color: #2196F3;
    background: rgba(26, 26, 26, 0.9);
    opacity: 0.7;
    border: 1px dashed #2196F3 !important;
    position: relative;
    box-sizing: border-box;
}

/* Ensure future cards override any other border styling */
.deadline-card.blue.future-card {
    border: 1px dashed #2196F3 !important;
}

.deadline-card.future-card:hover {
    opacity: 0.9;
}

/* Bill type icon underlays - positioned top-right, non-interactive */
.deadline-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 5%;
    width: 160px;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center right;
    opacity: 1;
    pointer-events: none;
    z-index: 1;
}

/* Electric - lightning bolt */
.deadline-card[data-name*="electric" i]::before,
.deadline-card[data-name*="electricity" i]::before,
.deadline-card[data-name*="power" i]::before,
.deadline-card[data-name*="georgia power" i]::before {
    background-image: url('DESIGN%20INPUT/ICONS/ELECTRIC.png');
}

/* Gas utility - flame */
.deadline-card[data-name*="gas" i]::before {
    background-image: url('DESIGN%20INPUT/ICONS/GAS.png');
}

/* Water - water drop */
.deadline-card[data-name*="water" i]::before,
.deadline-card[data-name*="sewer" i]::before {
    background-image: url('DESIGN%20INPUT/ICONS/WATER.png');
}

/* Internet - wifi signal */
.deadline-card[data-name*="internet" i]::before,
.deadline-card[data-name*="wifi" i]::before,
.deadline-card[data-name*="broadband" i]::before {
    background-image: url('DESIGN%20INPUT/ICONS/INTERNET.png');
}

/* Phone - phone */
.deadline-card[data-name*="phone" i]::before,
.deadline-card[data-name*="phone bill" i]::before,
.deadline-card[data-name*="cell" i]::before,
.deadline-card[data-name*="mobile" i]::before,
.deadline-card[data-name*="verizon" i]::before,
.deadline-card[data-name*="att" i]::before,
.deadline-card[data-name*="t-mobile" i]::before {
    background-image: url('DESIGN%20INPUT/ICONS/PHONE.png');
}

/* Cable/TV - television */
.deadline-card[data-name*="cable" i]::before,
.deadline-card[data-name*="streaming" i]::before,
.deadline-card[data-name*="streaming services" i]::before,
.deadline-card[data-name*="tv" i]::before,
.deadline-card[data-name*="comcast" i]::before,
.deadline-card[data-name*="xfinity" i]::before,
.deadline-card[data-name*="netflix" i]::before,
.deadline-card[data-name*="hulu" i]::before {
    background-image: url('DESIGN%20INPUT/ICONS/CABLE.png');
}

/* Trash - trash can */
.deadline-card[data-name*="trash" i]::before,
.deadline-card[data-name*="recycling" i]::before,
.deadline-card[data-name*="waste" i]::before,
.deadline-card[data-name*="garbage" i]::before {
    background-image: url('DESIGN%20INPUT/ICONS/TRASH.png');
}

/* Rent - house (same icon as mortgage) */
.deadline-card[data-name*="rent" i]::before {
    background-image: url('DESIGN%20INPUT/ICONS/MORTGAGE.png');
}

/* Mortgage - house */
.deadline-card[data-name*="mortgage" i]::before {
    background-image: url('DESIGN%20INPUT/ICONS/MORTGAGE.png');
}

/* Property Tax - government building */
.deadline-card[data-name*="property tax" i]::before,
.deadline-card[data-name*="tax" i]::before {
    background-image: url('DESIGN%20INPUT/ICONS/GOVERNMENT%20FEES.png');
}

/* Car Payment - car */
.deadline-card[data-name*="car payment" i]::before,
.deadline-card[data-name*="auto payment" i]::before,
.deadline-card[data-name*="vehicle" i]::before {
    background-image: url('DESIGN%20INPUT/ICONS/CAR%20PAYMENT.png');
}

/* Car Insurance - shield */
.deadline-card[data-name*="car insurance" i]::before,
.deadline-card[data-name*="auto insurance" i]::before,
.deadline-card[data-name*="geico" i]::before,
.deadline-card[data-name*="progressive" i]::before {
    background-image: url('DESIGN%20INPUT/ICONS/CAR%20INSURANCE.png');
}

/* Credit Card - credit card */
.deadline-card[data-name*="credit" i]::before,
.deadline-card[data-name*="visa" i]::before,
.deadline-card[data-name*="mastercard" i]::before,
.deadline-card[data-name*="amex" i]::before,
.deadline-card[data-name*="discover" i]::before {
    background-image: url('DESIGN%20INPUT/ICONS/CREDIT%20CARD.png');
}

/* Student Loan - graduation cap */
.deadline-card[data-name*="student loan" i]::before,
.deadline-card[data-name*="student" i]::before {
    background-image: url('DESIGN%20INPUT/ICONS/LOANS.png');
}

/* Personal Loan - money/dollar sign */
.deadline-card[data-name*="personal loan" i]::before,
.deadline-card[data-name*="loan" i]::before {
    background-image: url('DESIGN%20INPUT/ICONS/STUDENT%20LOANS.png');
}

/* Health Insurance - medical cross */
.deadline-card[data-name*="health insurance" i]::before,
.deadline-card[data-name*="medical" i]::before,
.deadline-card[data-name*="health" i]::before {
    background-image: url('DESIGN%20INPUT/ICONS/HEALTH.png');
}

/* Life Insurance - heart */
.deadline-card[data-name*="life insurance" i]::before,
.deadline-card[data-name*="life" i]::before {
    background-image: url('DESIGN%20INPUT/ICONS/LIFE%20INS.png');
}

/* Home Insurance - house icon */
.deadline-card[data-name*="home insurance" i]::before,
.deadline-card[data-name*="homeowner" i]::before,
.deadline-card[data-name*="homeowners" i]::before {
    background-image: url('DESIGN%20INPUT/ICONS/MORTGAGE.png');
}

/* Gym/Fitness - dumbbell */
.deadline-card[data-name*="gym" i]::before,
.deadline-card[data-name*="gym membership" i]::before,
.deadline-card[data-name*="fitness" i]::before,
.deadline-card[data-name*="planet fitness" i]::before {
    background-image: url('DESIGN%20INPUT/ICONS/FITNESS.png');
}

/* Pets - pet icon */
.deadline-card[data-name*="pet" i]::before,
.deadline-card[data-name*="vet" i]::before,
.deadline-card[data-name*="veterinary" i]::before {
    background-image: url('DESIGN%20INPUT/ICONS/PETS.png');
}


.deadline-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
}

.deadline-card:hover::before {
    height: 100%;
}

/* Card Content */
.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
    height: 100%;
    width: 100%;
    padding: 0;
    position: relative;
    z-index: 2;
}

/* Top row: Name and Recurring icon space */
.card-name-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    margin: 0;
}

.card-name {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
    word-break: break-word;
    flex: 1;
    margin: 0;
}

/* Amount section - maintains green card positioning */
.card-amount-section {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 12px;
}

.card-amount {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    margin: 0;
}

/* Bottom row: Date and Alert icon space - positioned like green cards */
.card-date-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 0;
}

/* Duplicate removed - defined above */

/* Amount color based on urgency - white for urgent, gray for distant */
.deadline-card.red .card-amount,
.deadline-card.orange .card-amount,
.deadline-card.yellow .card-amount {
    color: #ffffff;
}

.deadline-card.blue .card-amount,
.deadline-card.archive-blue .card-amount {
    color: #9E9E9E;
}

/* Green cards (completion state) */
.deadline-card.green .card-amount {
    color: #ffffff;
}

.card-date {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
    margin: 0;
}

/* Color-match dates to border colors for due today cards - higher specificity to override red !important */
.deadline-card.due-today.red .card-date,
.deadline-card.due-today .card-date {
    color: #ffffff !important;
}

/* Precise targeting: only cards due exactly today get white dates */
.deadline-card.due-exactly-today .card-date {
    color: #ffffff !important;
}

.deadline-card.orange.due-today .card-date {
    color: #FF8C00;
}

.deadline-card.yellow.due-today .card-date {
    color: #FFC107;
}

.deadline-card.blue.due-today .card-date {
    color: #2196F3;
}

/* Color-match dates to border colors for ALL cards */
.deadline-card.orange .card-date {
    color: #FF8C00;
}

.deadline-card.yellow .card-date {
    color: #FFC107;
}

.deadline-card.blue .card-date {
    color: #2196F3;
}

/* Color-match dates for urgent cards (1-3 days away) */
.deadline-card.red .card-date {
    color: #F44336 !important;
}

/* Complete Button */
.complete-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: 2px solid var(--accent-color, #4CAF50);
    background: rgba(26, 26, 26, 0.8);
    color: var(--accent-color, #4CAF50);
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    backdrop-filter: blur(10px);
}

.complete-btn:hover {
    background: var(--accent-color, #4CAF50);
    color: #000000;
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.complete-btn:active {
    transform: scale(0.95);
}

/* Modal */
.modal {
    display: none;
    position: absolute;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: modalFadeIn 0.3s ease;
}

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

/* Base modal content - shared basics */
.modal-content {
    background: #000000;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 95%;
    max-width: 600px;
    color: #ffffff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-height: 90%;
}

/* Deadline modal - perfectly centered in black box */
#deadlineModal {
    position: fixed !important;
    z-index: 1001;
}

.deadline-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 12px;
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1002;
}

@keyframes modalSlideIn {
    from { 
        opacity: 0;
        transform: translate(-50%, -55%);
    }
    to { 
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.close {
    position: absolute;
    top: 16px;
    right: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.close:hover {
    color: #ffffff;
}

h2 {
    margin-bottom: 32px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
}

/* Specific styling for deadline modal title */
#deadlineModal h2 {
    text-align: left;
    font-size: 20px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: calc(var(--spacing-unit) * 2.5);
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="date"],
input[type="url"],
select {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    background: rgba(26, 26, 26, 0.5);
    color: #ffffff;
    font-size: 14px;
    font-weight: 400;
    font-family: inherit;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    height: 44px;
    box-sizing: border-box;
}

/* Prevent autocomplete styling from overriding our colors - comprehensive coverage */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
input[type="text"]:-webkit-autofill,
input[type="text"]:-webkit-autofill:hover,
input[type="text"]:-webkit-autofill:focus,
input[type="text"]:-webkit-autofill:active,
input[type="email"]:-webkit-autofill,
input[type="email"]:-webkit-autofill:hover,
input[type="email"]:-webkit-autofill:focus,
input[type="email"]:-webkit-autofill:active,
#amount:-webkit-autofill,
#amount:-webkit-autofill:hover,
#amount:-webkit-autofill:focus,
#amount:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px rgba(26, 26, 26, 0.5) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    background-color: rgba(26, 26, 26, 0.5) !important;
    color: #ffffff !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

input[type="text"]:focus,
input[type="date"]:focus,
input[type="url"]:focus,
select:focus {
    outline: none;
    border-color: rgba(76, 175, 80, 0.5);
    background: rgba(26, 26, 26, 0.8);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

input[type="checkbox"] {
    margin-right: 12px;
    transform: scale(1.2);
}

/* Checkbox labels alignment */
.form-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    text-transform: none;
}

/* Recurring Options */
.recurring-options {
    margin-top: 16px;
    padding: 20px;
    background: rgba(76, 175, 80, 0.05);
    border: 1px solid rgba(76, 175, 80, 0.1);
    border-radius: 12px;
}

/* Form Buttons */
.form-buttons {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 40px;
}

/* Deadline modal buttons - match settings style */
#deadlineModal button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 100px;
}

/* Settings modal buttons - proper size and alignment */
#settingsModal .form-buttons {
    justify-content: flex-end !important;
}

#settingsModal button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 100px;
}

#saveButton, #payNowButton {
    background: #4CAF50;
    color: #ffffff;
}

#saveButton:hover, #payNowButton:hover {
    background: #45a049;
}

#deleteButton {
    background: rgba(255, 255, 255, 0.1);
    color: #f44336;
    border: 1px solid #f44336;
}

#deleteButton:hover {
    background: rgba(244, 67, 54, 0.1);
}

/* Date picker styling */
input[type="date"]::-webkit-calendar-picker-indicator {
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    cursor: pointer;
    filter: invert(1);
    transition: all 0.3s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    background-color: rgba(76, 175, 80, 0.8);
}

/* Responsive Design */
/* MOBILE: Header adjustments ≤ 768px */
@media (max-width: 768px) {
    /* Reduce header spacing for mobile to save screen space */
    .header-container {
        padding: 10px 0 0 0; /* Move header up */
    }
    
    .container {
        padding: 10px 12px; /* Reduce top padding */
    }
    
    /* Position logo and gear relative to viewport edges, not gray borders */
    .header {
        position: relative;
        padding: 0; /* Remove default padding */
        height: 40px; /* Maintain header height to prevent black area collapse */
    }
    
    .logo-section {
        position: absolute !important;
        left: 5px !important; /* Move further outward */
        top: 0;
        z-index: 1002; /* High z-index to ensure visibility */
    }
    
    .header-buttons {
        position: absolute;
        right: 8px; /* Move further outward */
        top: 0;
    }
    
    .main-content {
        margin: 0 5px 40px 5px; /* Reduced side margins by 75% total for mobile */
        margin-top: 10px; /* Add small gap from repositioned header */
    }
}

/* MOBILE: Modal positioning and sizing ≤ 768px */
@media (max-width: 768px) {
    /* Deadline modal centered on mobile */
    .deadline-modal-content {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 95% !important;
        max-width: 400px !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
        padding: 30px 20px;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    /* Settings buttons stay horizontal and right-aligned on mobile */
    #settingsModal .form-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    button {
        width: 100%;
    }
}

/* TABLET: Modal positioning 769px - 1199px */
@media (min-width: 769px) and (max-width: 1199px) {
    .deadline-modal-content {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 90%;
        max-width: 600px;
    }
    
    .settings-modal {
        position: absolute;
        width: min(80vw, 500px);
        max-width: calc(100vw - 40px);
        top: 0;
        right: 0;
        left: auto;
        transform: none;
    }
}

/* WIDER TABLETS: Minimum width for settings modal ≥ 900px */
@media (min-width: 900px) {
    .settings-modal {
        min-width: 450px; /* Wider minimum once we hit tablet size */
    }
}

/* DESKTOP: Modal positioning ≥ 1200px */
@media (min-width: 1200px) {
    .deadline-modal-content {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
    }
    
    .settings-modal {
        position: absolute;
        width: min(80vw, 600px);
        min-width: 500px; /* Wider minimum for desktop */
        max-width: calc(100vw - 40px);
        top: 0;
        right: 0;
        left: auto;
        transform: none;
    }
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Storage Settings Styles */
.access-options, .storage-options {
    display: flex;
    gap: calc(var(--spacing-unit) * 1);
    margin-bottom: calc(var(--spacing-unit) * 2);
    flex-wrap: wrap;
}

.access-option, .storage-option {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: calc(var(--spacing-unit) * 1.5);
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 140px;
}

.access-option:hover, .storage-option:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.access-option.active, .storage-option.active {
    border-color: #4CAF50 !important;
    background: rgba(76, 175, 80, 0.1) !important;
}

.access-option .option-title, .storage-option .option-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: calc(var(--spacing-unit) * 0.5);
}

.access-option .option-description, .storage-option .option-description {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
}

.storage-accordion {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
    margin-top: 0;
}

.storage-accordion.expanded {
    max-height: 300px;
    opacity: 1;
    margin-top: calc(var(--spacing-unit) * 1.5);
}

.storage-accordion .accordion-content {
    padding: calc(var(--spacing-unit) * 1.5);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid #4CAF50;
}

.folder-selector {
    display: flex;
    gap: calc(var(--spacing-unit) * 1);
    align-items: center;
}

.folder-btn, .wallet-btn {
    padding: calc(var(--spacing-unit) * 0.75) calc(var(--spacing-unit) * 1.25);
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.folder-btn:hover, .wallet-btn:hover {
    background: #45a049;
}

.folder-path {
    flex: 1;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.security-options {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 0.75);
}

.security-options label {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 0.75);
    font-size: 14px;
    cursor: pointer;
}

.wallet-options {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 1);
}

.wallet-manual input {
    width: 100%;
    padding: calc(var(--spacing-unit) * 0.75);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
}

/* Animations */
@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.deadline-card {
    animation: cardAppear 0.3s ease forwards;
}

/* Completion animation - smooth float without bounce */
@keyframes smoothFloatAway {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
        z-index: 100;
    }
    100% {
        opacity: 0;
        transform: translateY(-120px) scale(0.95);
        z-index: 100;
    }
}

.completing-animation {
    /* HAPPY MOMENT - Override everything with celebration green */
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 50%, #4CAF50 100%) !important;
    border: 3px solid #4CAF50 !important;
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.8), 
                0 12px 40px rgba(76, 175, 80, 0.6), 
                inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    animation: smoothFloatAway 1.6s cubic-bezier(0.4, 0, 0.2, 1) forwards, 
               celebrationGlow 0.4s ease-out !important;
    pointer-events: none;
    /* Stop any other animations completely */
    animation-fill-mode: both !important;
}

/* Force override due-today styling during completion */
.deadline-card.due-today.completing-animation {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 50%, #4CAF50 100%) !important;
    border: 3px solid #4CAF50 !important;
    animation: smoothFloatAway 1.6s cubic-bezier(0.4, 0, 0.2, 1) forwards, 
               celebrationGlow 0.4s ease-out !important;
}

@keyframes celebrationGlow {
    0% { 
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.8), 
                    0 8px 32px rgba(76, 175, 80, 0.4), 
                    inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    50% { 
        box-shadow: 0 0 0 20px rgba(76, 175, 80, 0.2), 
                    0 16px 50px rgba(76, 175, 80, 0.8), 
                    inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.0), 
                    0 12px 40px rgba(76, 175, 80, 0.6), 
                    inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
}

/* Brandmark completion grow and rise animation */
@keyframes brandmarkGrowUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-40px) scale(1.4);
        opacity: 0;
    }
}

/* Completion area positioning */
.completion-area {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-top: 8px;
}

/* Apply grow animation to brandmark during completion */
.completing-animation .completion-area img {
    animation: brandmarkGrowUp 1.6s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

/* Extend button styling */
.extend-button:hover img {
    opacity: 1 !important;
}

.extend-dropdown {
    border: 1px solid #555;
}

.extend-option:hover {
    background: #444 !important;
}

/* Delete animation - gentle fade and shrink */
@keyframes cardDelete {
    0% {
        opacity: 1;
        transform: scale(1);
        height: 180px;
        margin: 0;
        padding: 16px;
    }
    50% {
        opacity: 0.3;
        transform: scale(0.9);
        height: 180px;
        margin: 0;
        padding: 16px;
    }
    100% {
        opacity: 0;
        transform: scale(0.8);
        height: 0;
        margin: 0;
        padding: 0;
        overflow: hidden;
    }
}

.deleting-animation {
    animation: cardDelete 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
}

/* Smooth repositioning for remaining cards */
@keyframes smoothReposition {
    0% {
        transform: scale(1) translateX(0);
    }
    50% {
        transform: scale(0.98) translateX(-3px);
    }
    100% {
        transform: scale(1) translateX(0);
    }
}

.repositioning {
    animation: smoothReposition 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transition: all 0.4s ease;
}


/* Extend deadline prompt */
.extend-prompt {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
}

.extend-prompt:hover {
    background: rgba(255, 193, 7, 0.2);
    border-color: rgba(255, 193, 7, 0.5);
    transform: scale(1.05);
}

/* Settings modal - back inside main-content with better height */
.settings-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    width: min(90vw, 600px);
    max-width: calc(100vw - 80px);
    border-radius: 12px;
    overflow-y: auto;
    max-height: calc(100vh - 160px); /* More generous height */
    z-index: 1001;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
}

/* Consistent Coming Soon styling */
.coming-soon-text {
    color: #4CAF50;
    font-size: 14px;
    font-weight: normal;
    margin-top: -4px;
    margin-bottom: 0;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.deadline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: calc(var(--spacing-unit) * 2.5);
}

.deadline-header .close {
    position: static;
    top: auto;
    right: auto;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    transform: translateY(-18px);
}

.deadline-header h2 {
    margin: 0;
    text-align: left;
}

.close-x {
    font-size: 24px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
    line-height: 1;
    display: flex;
    align-items: center;
    transform: translateY(-16px);
}

.close-x:hover {
    color: #ffffff;
}

.settings-section {
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.settings-section h3 {
    font-size: 18px;
    margin-bottom: calc(var(--spacing-unit) * 2);
    color: rgba(255, 255, 255, 0.9);
}

/* Full-width card styling */
.access-option, .storage-option {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: calc(var(--spacing-unit) * 1.5);
    padding-left: calc(var(--spacing-unit) * 4);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: calc(var(--spacing-unit) * 1);
    position: relative;
}

.access-option:hover, .storage-option.toggle-option:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.access-option.active, .storage-option.active {
    border-color: #4CAF50 !important;
    background: rgba(76, 175, 80, 0.1) !important;
}

.storage-option.always-active {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    cursor: default;
}

.multi-device-only.muted {
    opacity: 0.7;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.multi-device-only.muted .status-dot {
    background: rgba(255, 255, 255, 0.3);
}

.multi-device-only.muted .option-title,
.multi-device-only.muted .option-description {
    color: rgba(255, 255, 255, 0.6);
}

.multi-device-only.muted .price-tag {
    opacity: 0.5;
}

.price-tag {
    color: rgba(255, 255, 255, 0.7);
    font-size: 17px;
    font-weight: 600;
    position: absolute;
    right: calc(var(--spacing-unit) * 1.5);
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

.access-option.active .price-tag,
.storage-option.active .price-tag,
.storage-option.always-active .price-tag {
    color: #4CAF50;
}

.price-tag.free {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.access-option.active .price-tag.free,
.storage-option.active .price-tag.free,
.storage-option.always-active .price-tag.free {
    background: #4CAF50;
    color: #fff;
    font-size: 11px;
    padding: 4px 8px;
}

/* Status indicator dots */
.status-dot {
    position: absolute;
    left: calc(var(--spacing-unit) * 1.5);
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.status-dot.active {
    background: #4CAF50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
}

.option-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.2;
}

.option-description {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.3;
}

/* Accordion styling */
.storage-accordion {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0 0 8px 8px;
    margin-top: -1px;
    margin-bottom: calc(var(--spacing-unit) * 1);
}

.storage-accordion.expanded {
    max-height: 500px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.accordion-content {
    padding: calc(var(--spacing-unit) * 2);
}

.form-group {
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 16px;
    background: #2d2d2d;
    border: 1px solid #4a4a4a;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input::placeholder {
    color: #888;
}

.form-group input:focus {
    border-color: #4CAF50;
    outline: none;
}

.btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
    min-width: 132px;
}

.btn:hover {
    background: #45a049;
}

/* Login/Create Account Toggle Buttons */
.auth-toggle-container {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 2px;
    margin-bottom: 20px;
}

.auth-toggle-container button {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.auth-toggle-container button.active {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.btn.btn-primary {
    background: #4CAF50;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
}

/* Coming Soon state - clean implementation for future removal */
.access-option.coming-soon,
.storage-option.coming-soon {
    pointer-events: none;
    position: relative;
}

/* Prevent any interactions on coming soon overlay */
.access-option.coming-soon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    pointer-events: auto;
    z-index: 1;
}

/* MOBILE: Settings modal sizing */
@media (max-width: 768px) {
    .settings-modal {
        top: 10px;
        right: 10px;
        width: calc(100vw - 30px);
        max-width: 350px; /* Allow growth to 350px, then constrain there */
        max-height: calc(100vh - 140px);
    }
}
    
    .settings-section {
        margin-bottom: 16px !important;
        padding-bottom: 12px !important;
    }
    
    .settings-section h3 {
        font-size: 16px !important;
        margin-bottom: 12px !important;
    }
    
    .access-option, .storage-option {
        padding: 12px !important;
        padding-left: 36px !important;
        margin-bottom: 8px !important;
    }
    
    .option-title {
        font-size: 14px !important;
        margin-bottom: 2px !important;
    }
    
    .option-description {
        font-size: 12px !important;
        padding-right: 60px !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.2;
    }
    
    .price-tag {
        font-size: 15px !important;
        right: 12px !important;
    }
    
    .price-tag.free {
        font-size: 10px !important;
        padding: 3px 6px !important;
    }
    
    .status-dot {
        left: 12px !important;
        width: 6px !important;
        height: 6px !important;
    }
    
    /* Reduce button widths for mobile */
    .btn {
        min-width: 100px !important;
        width: 80% !important;
        max-width: 120px !important;
        padding: 8px 16px !important;
        font-size: 13px !important;
    }
    
    .form-group {
        margin-bottom: 16px !important;
    }
    
    .form-group label {
        font-size: 13px !important;
        margin-bottom: 6px !important;
    }
    
    .form-group input {
        padding: 10px !important;
        font-size: 13px !important;
    }
    
    .accordion-content {
        padding: 16px !important;
    }
    
    /* Force green accent color for all radio buttons */
    input[type="radio"] {
        accent-color: #4CAF50 !important;
    }
    
    /* Target settings specifically */
    .settings-modal input[type="radio"] {
        accent-color: #4CAF50 !important;
    }
    
    /* Global override */
    * input[type="radio"] {
        accent-color: #4CAF50 !important;
    }
}

/* EXTEND? text positioning over calendar icon - all screen sizes */
.extend-text {
    top: 7px !important;
    right: -8px !important;
    font-size: 8.4px !important; /* 40% smaller than 14px */
    z-index: 15 !important;
    transform: none !important;
    color: white !important;
    font-weight: bold !important;
    text-shadow: none !important;
}

/* MOBILE: Tooltip font size ≤768px */
@media (max-width: 768px) {
    #announcement-tooltip div div:nth-child(2) {
        font-size: 13px !important;
    }
}

/* TABLET: Tooltip sizing 769px - 1199px */
@media (min-width: 769px) and (max-width: 1199px) {
    #announcement-tooltip {
        max-width: 420px !important;
    }
}

/* DESKTOP: Tooltip sizing ≥ 1200px */
@media (min-width: 1200px) {
    #announcement-tooltip {
        max-width: 400px !important;
    }
}

/* Save reminder animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}