:root {
    --bg-color: #f1f5f9;
    --text-color: #1e293b;
    --hint-color: #64748b;
    --link-color: #800020;
    --button-color: #800020;
    --button-text-color: #ffffff;
    --secondary-bg-color: #e2e8f0;

    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glow-color: rgba(128, 0, 32, 0.12);
    --accent-glow: rgba(236, 72, 153, 0.25);
    --accent-color: #db2777;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

*::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

body {
    background: radial-gradient(circle at top, var(--secondary-bg-color, #e2e8f0) 0%, var(--bg-color, #f1f5f9) 100%);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 16px;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.08);
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:active {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}

.header-card {
    position: sticky;
    top: 16px;
    z-index: 1000;
    transition: padding 0.15s ease-out, top 0.15s ease-out, background-color 0.15s ease-out, box-shadow 0.15s ease-out;
    will-change: padding, top;
}

.header-card.compact {
    padding: 6px 10px !important;
    top: 6px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 4px 16px rgba(128, 0, 32, 0.08) !important;
}

.header-card .avatar,
.header-card .profile-name,
.header-card #profile-greeting,
.header-card .add-header-btn,
.header-card .add-header-btn i,
.header-card #header-logo,
.header-card #header-divider {
    transition: all 0.15s ease-out;
}

.header-card.compact .avatar {
    width: 26px !important;
    height: 26px !important;
    font-size: 9px !important;
    border-width: 1px !important;
}

.header-card.compact #profile-greeting {
    font-size: 7.5px !important;
    letter-spacing: 0.3px !important;
}

.header-card.compact .profile-name {
    font-size: 11px !important;
}

.header-card.compact .add-header-btn {
    width: 24px !important;
    height: 24px !important;
}

.header-card.compact .add-header-btn i {
    width: 12px !important;
    height: 12px !important;
}

.header-card.compact #header-logo {
    height: 18px !important;
}

.header-card.compact #header-divider {
    height: 12px !important;
}

.header-card:active {
    transform: none !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

/* Profile Header */
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: linear-gradient(135deg, #800020, #a32638);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: white;
    border: 1.5px solid white;
    box-shadow: 0 2px 6px rgba(128, 0, 32, 0.2);
    box-sizing: border-box;
}

.profile-name {
    font-size: 13px;
    font-weight: 700;
}

.profile-title {
    font-size: 12px;
    color: var(--hint-color);
}

/* Calendar Controls */
.calendar-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.month-year-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s, transform 0.1s;
    user-select: none;
}

.month-year-title:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--link-color);
}

.month-year-title:active {
    background: rgba(0, 0, 0, 0.08);
    transform: scale(0.97);
}

.control-btn {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--button-color, #800020);
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.control-btn:active {
    background: rgba(0, 0, 0, 0.08);
}

/* Calendar Table */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}

.weekday-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--hint-color);
    padding: 4px 0;
    text-transform: uppercase;
}

.day-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 5px;
    box-sizing: border-box;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: background 0.2s, transform 0.1s;
}

.day-cell:active {
    transform: scale(0.92);
}

.day-cell.other-month {
    color: rgba(0, 0, 0, 0.25);
}

.day-cell.today {
    background: radial-gradient(circle, rgba(244, 63, 94, 0.85) 0%, rgba(244, 63, 94, 0.35) 45%, rgba(244, 63, 94, 0) 70%) !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: none !important;
}

.day-cell.selected {
    background: radial-gradient(circle, rgba(128, 0, 32, 0.9) 0%, rgba(128, 0, 32, 0.4) 45%, rgba(128, 0, 32, 0) 70%) !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: none !important;
}

.day-cell.day-income:not(.today):not(.selected) {
    background: radial-gradient(circle, rgba(22, 163, 74, 0.45) 0%, rgba(22, 163, 74, 0.18) 45%, rgba(22, 163, 74, 0) 70%) !important;
    border: none !important;
    box-shadow: none !important;
}

.day-cell.day-expense:not(.today):not(.selected) {
    background: radial-gradient(circle, rgba(220, 38, 38, 0.48) 0%, rgba(220, 38, 38, 0.2) 45%, rgba(220, 38, 38, 0) 70%) !important;
    border: none !important;
    box-shadow: none !important;
}

.reminder-dot {
    width: 4px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 50%;
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 6px var(--accent-color);
}

.goal-dot {
    width: 4px;
    height: 4px;
    background: #f59e0b;
    border-radius: 50%;
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 6px #f59e0b;
}

.day-cell.selected .reminder-dot,
.day-cell.selected .goal-dot {
    background: #ffffff;
    box-shadow: 0 0 6px #ffffff;
}

.cc-logo-stack {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 16px;
    width: 100%;
    pointer-events: none;
}

.cc-stack-logo {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    background: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    padding: 0.5px;
    box-sizing: border-box;
    transition: all 0.2s;
}

.day-cell.selected .cc-stack-logo {
    border-color: var(--button-color);
}

.general-stack-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 8.5px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
    transition: all 0.2s;
}

.day-cell.selected .general-stack-icon {
    border-color: var(--button-color);
}

.day-cell.holiday-date {
    color: #ef4444 !important;
    font-weight: 700;
    background: rgba(239, 68, 68, 0.08);
}

.day-cell.selected.holiday-date {
    color: var(--button-text-color) !important;
}

/* Weekend Styling */
.weekday-label.sunday,
.day-cell.sunday:not(.other-month):not(.selected):not(.today) {
    color: #f87171;
}

.weekday-label.saturday,
.day-cell.saturday:not(.other-month):not(.selected):not(.today) {
    color: #60a5fa;
}

.day-cell.other-month.sunday {
    color: rgba(248, 113, 113, 0.25);
}

.day-cell.other-month.saturday {
    color: rgba(96, 165, 250, 0.25);
}

/* Paid Reminder Dimming */
.cc-logo-stack.paid-stack {
    opacity: 0.4;
    filter: grayscale(80%);
}

.reminder-dot.paid-dot {
    opacity: 0.35;
    background: var(--hint-color);
    box-shadow: none;
}

.holiday-banner {
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    border-left: 4px solid #ef4444 !important;
    color: #b91c1c;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.08);
}

/* Reminders Area */
.reminders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 8px;
}

.reminders-date {
    font-size: 14px;
    font-weight: 600;
    color: var(--link-color);
}

.reminders-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.reminder-item {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.reminder-text {
    font-size: 13px;
    line-height: 1.4;
    flex-grow: 1;
}

.delete-btn {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.delete-btn:active {
    opacity: 1;
}

/* Add Form */
.add-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.input-group {
    position: relative;
}

textarea {
    width: 100%;
    min-height: 50px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 10px;
    color: var(--text-color);
    font-size: 13px;
    resize: none;
    outline: none;
}

textarea:focus {
    border-color: var(--link-color);
}

/* Icon and Color Selectors */
.icon-selector-grid,
.color-selector-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.icon-select-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.icon-select-btn:hover,
.icon-select-btn.active {
    border-color: var(--link-color);
    background: rgba(128, 0, 32, 0.08);
    color: var(--link-color);
    transform: scale(1.08);
}

.color-select-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.color-select-btn.active {
    border-color: #1e293b;
    transform: scale(1.1);
    box-shadow: 0 0 8px currentColor;
}

.action-button {
    background: var(--button-color);
    color: var(--button-text-color);
    border: none;
    border-radius: 6px;
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Add Reminder Button in Header */
.add-header-btn {
    background: var(--button-color);
    border: none;
    color: var(--button-text-color);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(128, 0, 32, 0.3);
    transition: transform 0.2s, background 0.2s;
}

.add-header-btn:active {
    transform: scale(0.9);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    /* Lebih kecil untuk mobile */
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 100%;
    max-width: 360px;
    max-height: 85vh;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    margin-bottom: 0;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-sizing: border-box;
    padding: 0 !important;
    background: rgba(255, 255, 255, 0.97) !important;
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.modal-header {
    flex-shrink: 0 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    padding: 16px 18px 10px 18px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    margin: 0 !important;
}

.modal-header h3 {
    margin: 0 !important;
}

.modal-date {
    margin-bottom: 0 !important;
    margin-top: 4px !important;
}

.modal-body {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 14px 18px !important;
    margin: 0 !important;
    scrollbar-width: none !important;
}

.modal-body::-webkit-scrollbar {
    display: none !important;
}

.modal-actions {
    flex-shrink: 0 !important;
    position: sticky !important;
    bottom: 0 !important;
    z-index: 10 !important;
    padding: 10px 18px 16px 18px !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    margin: 0 !important;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}



.modal-body textarea {
    width: 100%;
    min-height: 100px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: var(--text-color);
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.modal-body textarea:focus {
    border-color: var(--link-color);
}

/* Form Controls */
.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--hint-color);
    margin-bottom: 6px;
    text-align: left;
}

.type-toggle-group {
    display: flex;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 3px;
    gap: 2px;
}

.type-toggle-btn {
    flex: 1;
    padding: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--hint-color);
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.type-toggle-btn.active {
    background: var(--button-color);
    color: var(--button-text-color);
    box-shadow: 0 2px 8px rgba(128, 0, 32, 0.2);
}

.form-select,
.form-input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    text-align: left;
}

.form-select:focus,
.form-input:focus {
    border-color: var(--link-color);
}

.form-select option {
    background: var(--bg-color, #f1f5f9);
    color: var(--text-color);
}

.form-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.reminder-logo {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: contain;
    margin-right: 8px;
    flex-shrink: 0;
    background: white;
    padding: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.reminder-content-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
}

/* Swipe container & CC styling */
.swipe-container {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 4px;
    display: flex;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
}

.swipe-container.cc-type {
    border-left: 4px solid #3b82f6;
}

.swipe-container.general-type {
    border-left: 4px solid var(--accent-color);
}

.swipe-container.paid {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
    border-left: 4px solid #10b981 !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15) !important;
}

.swipe-content {
    width: 100%;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    position: relative;
    background: transparent;
}

.swipe-options {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    z-index: 1;
    transition: opacity 0.3s;
    opacity: 0;
    pointer-events: none;
    border-radius: 0 6px 6px 0;
    overflow: hidden;
}

.swipe-container.actions-1 .swipe-options {
    width: 55px;
}

.swipe-container.actions-1.revealed .swipe-content {
    transform: translateX(-55px);
}

.swipe-container.actions-2 .swipe-options {
    width: 110px;
}

.swipe-container.actions-2.revealed .swipe-content {
    transform: translateX(-110px);
}

.swipe-container.actions-3 .swipe-options {
    width: 165px;
}

.swipe-container.actions-3.revealed .swipe-content {
    transform: translateX(-165px);
}

.swipe-container.actions-4 .swipe-options {
    width: 220px;
}

.swipe-container.actions-4.revealed .swipe-content {
    transform: translateX(-220px);
}

.swipe-container.revealed .swipe-options {
    opacity: 1;
    pointer-events: auto;
}

.swipe-opt-btn {
    flex: 1;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.2s;
    color: white;
    padding: 0;
    line-height: 1.1;
}

.swipe-opt-btn.edit-btn {
    background: #800020;
}

.swipe-opt-btn.edit-btn:active {
    background: #600018;
}

.swipe-opt-btn.pay-btn {
    background: #10b981;
}

.swipe-opt-btn.pay-btn:active {
    background: #059669;
}

.swipe-opt-btn.pay-btn.active {
    background: #f59e0b;
}

.swipe-opt-btn.delete-btn {
    background: #ef4444;
}

.swipe-opt-btn.delete-btn:active {
    background: #dc2626;
}

.swipe-opt-btn.history-btn {
    background: #3b82f6;
}

.swipe-opt-btn.history-btn:active {
    background: #1d4ed8;
}

.reminder-card-cc {
    padding: 10px 12px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    width: 100%;
    box-sizing: border-box;
    gap: 8px;
}

.swipe-container.paid .cc-nominal {
    color: #16a34a !important;
    text-decoration: line-through;
}

.swipe-container.paid .reminder-text {
    text-decoration: line-through;
    opacity: 0.6;
}

.cc-logo {
    height: 28px;
    width: 28px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: white;
    border-radius: 50%;
    padding: 1px;
    flex-shrink: 0;
}

.cc-bank-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cc-nominal {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-color);
    transition: all 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.cc-card-name {
    font-size: 10px;
    color: var(--hint-color);
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.modal-btn {
    flex: 1;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.1s;
}

.modal-btn:active {
    transform: scale(0.97);
}

.modal-btn.cancel {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
}

.modal-btn.cancel:active {
    background: rgba(0, 0, 0, 0.08);
}

.modal-btn.save {
    background: var(--button-color);
    color: var(--button-text-color);
    box-shadow: 0 4px 12px rgba(128, 0, 32, 0.3);
}

.modal-btn.save:active {
    background: #600018;
}

/* Lock Screen styling */
#lock-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    text-align: center;
    padding: 24px;
}

#app-content {
    display: none;
}

.loader {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid var(--link-color);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Tab Layout */
.tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease-in-out;
}

.tab-content.active {
    display: block;
    opacity: 1;
}

/* Dashboard Statistics Grid */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8px !important;
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 8px !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    height: 60px;
    /* samakan tinggi dengan grid resume bank */
    box-sizing: border-box;
    margin-bottom: 0 !important;
}

.stat-card.tagihan-unpaid {
    border-top: 2px solid #ea580c !important;
}

.stat-card.tagihan-paid {
    border-top: 2px solid #16a34a !important;
}

.stat-card.reminders-active {
    border-top: 2px solid #9333ea !important;
}

.stat-icon {
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-label {
    font-size: 8px;
    color: var(--hint-color);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-color);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* CC Progress Card */
.cc-progress-card {
    padding: 14px 16px !important;
}

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

.progress-header h4 {
    font-size: 13px;
    font-weight: 700;
    margin: 0;
}

#dash-progress-percent {
    font-size: 14px;
    font-weight: 800;
    color: var(--link-color);
}

.progress-bar-container {
    height: 8px;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--button-color), var(--link-color));
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

.progress-stats {
    font-size: 11px;
    color: var(--hint-color);
    text-align: right;
}

/* Card General Header Title */
.card-title-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 6px;
}

.card-title-header h4 {
    font-size: 13px;
    font-weight: 700;
    margin: 0;
}

/* CC Checklist List */
.cc-checklist-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
}

.cc-checklist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    transition: all 0.2s;
}

.cc-checklist-item.paid {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.2);
}

.cc-checklist-info {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    flex-grow: 1;
}

.cc-checklist-meta {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cc-checklist-bank {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cc-checklist-cardname {
    font-size: 9px;
    color: var(--hint-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cc-checklist-date {
    font-size: 9px;
    color: var(--hint-color);
    margin-top: 1px;
}

.cc-checklist-action {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.cc-checklist-nominal {
    font-size: 12px;
    font-weight: 800;
}

.cc-checklist-item.paid .cc-checklist-nominal {
    color: #16a34a;
    text-decoration: line-through;
    opacity: 0.7;
}

.cc-checklist-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1.5px solid var(--hint-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: transparent;
}

.cc-checklist-item.paid .cc-checklist-checkbox {
    border-color: #10b981;
    background: #10b981;
    color: white;
}

.cc-checklist-checkbox i {
    width: 12px;
    height: 12px;
}

/* Upcoming Agenda */
.upcoming-agenda-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
}

.agenda-group {
    margin-bottom: 4px;
}

.agenda-group-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--link-color);
    text-transform: uppercase;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.agenda-group-title::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
}

.agenda-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.agenda-item:active {
    transform: scale(0.98);
}

.agenda-item.holiday-item {
    border-left: 3px solid #ef4444;
    background: rgba(239, 68, 68, 0.03);
}

.agenda-item.cc-item {
    border-left: 3px solid #3b82f6;
}

.agenda-item.cc-item.paid {
    background: rgba(16, 185, 129, 0.03);
    border-left: 3px solid #10b981;
}

.agenda-item.general-item {
    border-left: 3px solid var(--accent-color);
}

.agenda-item-content {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    flex-grow: 1;
}

.agenda-item-text {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-color);
}

.agenda-item.paid .agenda-item-text {
    text-decoration: line-through;
    opacity: 0.6;
}

.agenda-item-value {
    font-size: 11px;
    font-weight: 700;
    color: #3b82f6;
    flex-shrink: 0;
    margin-left: 8px;
}

.agenda-item.paid .agenda-item-value {
    color: #10b981;
    text-decoration: line-through;
    opacity: 0.6;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    height: 60px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(190%);
    -webkit-backdrop-filter: blur(20px) saturate(190%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: height 0.15s ease-out,
        bottom 0.15s ease-out,
        border-radius 0.15s ease-out,
        box-shadow 0.15s ease-out,
        left 0.15s ease-out,
        right 0.15s ease-out;
    will-change: height, bottom, left, right;
}

.bottom-nav.compact {
    height: 44px;
    bottom: 10px;
    left: 32px;
    right: 32px;
    border-radius: 28px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.bottom-nav-container {
    width: 100%;
    max-width: 480px;
    display: flex;
    justify-content: space-around;
    padding: 0 6px;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--hint-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    padding: 6px 4px;
    transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 14px;
    flex: 1;
    margin: 0 2px;
}

.nav-btn i {
    width: 18px;
    height: 18px;
    transition: transform 0.2s, width 0.45s cubic-bezier(0.16, 1, 0.3, 1), height 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-btn span {
    font-size: 8.5px;
    font-weight: 600;
    white-space: nowrap;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), margin-top 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 20px;
    overflow: hidden;
    opacity: 1;
}

.bottom-nav.compact .nav-btn span {
    opacity: 0;
    max-height: 0;
    margin-top: 0;
}

.bottom-nav.compact .nav-btn i {
    width: 20px;
    height: 20px;
}

.bottom-nav.compact .nav-btn {
    padding: 4px;
    border-radius: 12px;
}

.nav-btn.active {
    color: var(--link-color);
    background: rgba(128, 0, 32, 0.08);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.04);
}

.nav-btn.active i {
    transform: translateY(-1px);
    color: var(--link-color);
}

body {
    padding-bottom: 96px !important;
}

/* Settings View Styles */
.settings-cc-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 4px;
}

.settings-bank-group {
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.02);
    overflow: hidden;
    margin-bottom: 14px;
}

.settings-bank-header {
    background: rgba(0, 0, 0, 0.03);
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--link-color) !important;
    text-transform: uppercase;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-bank-header span {
    color: var(--link-color) !important;
    font-weight: 700;
}

.settings-bank-header img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    background: #ffffff;
    flex-shrink: 0;
}

.settings-bank-cards {
    display: block;
}

.settings-card-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    background: transparent;
    transition: background 0.2s;
}

.settings-card-item:last-child {
    border-bottom: none;
}

.settings-card-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.settings-card-label {
    font-size: 13px;
    color: var(--text-color) !important;
    font-weight: 400;
}

.settings-card-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1.5px solid var(--link-color);
    /* Use link color for better visibility */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: transparent;
    color: transparent;
}

.settings-card-item.selected .settings-card-checkbox {
    border-color: var(--link-color);
    background: var(--link-color);
    color: #ffffff;
}

.settings-card-checkbox i {
    width: 12px;
    height: 12px;
    stroke-width: 3px;
}

/* Toggle Switch CC Settings */
.switch-slider-cc:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: .3s;
}

input:checked+.switch-slider-cc {
    background-color: var(--link-color);
}

input:checked+.switch-slider-cc:before {
    transform: translateX(16px);
}

/* iOS Date Input Styling & Constraints */
input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
    color-scheme: light;
    max-width: 100%;
    min-height: 40px;
    /* Ensure sufficient tap target */
    display: inline-flex;
}

/* Autocomplete search suggestions styling */
.autocomplete-suggestions {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    max-height: 180px;
    overflow-y: auto;
    z-index: 1050;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.autocomplete-suggestion {
    padding: 8px 12px;
    font-size: 12px;
    color: var(--text-color);
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: background 0.15s ease, color 0.15s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.autocomplete-suggestion:last-child {
    border-bottom: none;
}

.autocomplete-suggestion:hover,
.autocomplete-suggestion.active {
    background: rgba(128, 0, 32, 0.08);
    color: #800020;
    font-weight: 700;
}

.autocomplete-suggestion img {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* ATM Card Styles */
.finance-acc-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 12px;
    scrollbar-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 12px;
    background: transparent;
    -webkit-overflow-scrolling: touch;
}

.finance-acc-scroll-container::-webkit-scrollbar {
    display: none;
}

.finance-acc-grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding-bottom: 12px;
    width: 100%;
    box-sizing: border-box;
}

.finance-atm-card {
    min-width: 0;
    width: 100%;
    height: 110px;
    border-radius: 12px;
    padding: 10px 12px;
    position: relative;
    color: white;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.22),
        inset 0 -1px 2px rgba(0, 0, 0, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.18);
    flex-shrink: 0;
    box-sizing: border-box;
    background-clip: padding-box;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
}

.finance-atm-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.finance-atm-card-overlay::before {
    content: '';
    position: absolute;
    top: -25%;
    right: -15%;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
}

.finance-atm-card-overlay::after {
    content: '';
    position: absolute;
    bottom: -35%;
    left: -10%;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
}

.finance-atm-card-shine {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 30%, transparent 60%, rgba(0, 0, 0, 0.12) 100%);
    z-index: 2;
    pointer-events: none;
}

.finance-atm-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 3;
}

.finance-atm-card-logo-container {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.finance-atm-card-logo {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    padding: 1px;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.finance-atm-card-logo-placeholder {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.finance-atm-card-logo-placeholder i {
    font-size: 12px;
    color: white;
}

.finance-atm-card-title-block {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.finance-atm-card-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.finance-atm-card-type {
    font-size: 9.5px;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    text-transform: uppercase;
    line-height: 1;
}

.finance-atm-card-number {
    font-family: monospace;
    font-size: 11.5px;
    letter-spacing: 1.2px;
    opacity: 0.85;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    z-index: 3;
    margin: 4px 0;
    text-align: center;
    width: 100%;
}

.finance-atm-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 3;
}

.finance-atm-card-holder-block {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    margin-right: 6px;
}

.finance-atm-card-holder-label {
    font-size: 9px;
    text-transform: uppercase;
    opacity: 0.7;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    line-height: 1;
}

.finance-atm-card-holder {
    font-size: 10.5px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.finance-atm-card-balance-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}

.finance-atm-card-balance-label {
    font-size: 9px;
    text-transform: uppercase;
    opacity: 0.7;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    line-height: 1;
}

.finance-atm-card-balance {
    font-size: 13.5px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    white-space: nowrap;
}

/* Desktop layout overrides: see styles-desktop.css */

.finance-subtabs::-webkit-scrollbar,
.invest-subtabs::-webkit-scrollbar,
.cards-subtabs::-webkit-scrollbar {
    display: none;
}

.upcoming-agenda-card .agenda-group-title::after {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Settings Sub-tabs styles */
.settings-subtabs {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 6px !important;
    padding: 4px !important;
}

.settings-subtabs::-webkit-scrollbar {
    display: none !important;
}

.settings-subtabs .subtab-btn {
    flex: 0 0 auto !important;
    min-width: max-content !important;
    padding: 8px 14px !important;
    overflow: visible !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}

.settings-subtabs .subtab-btn.active {
    background: rgba(128, 0, 32, 0.08) !important;
    color: var(--link-color) !important;
}

.settings-subtabs .subtab-btn-text {
    display: inline-block !important;
    max-width: none !important;
    opacity: 1 !important;
    overflow: visible !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    margin-left: 0 !important;
}

/* Thicker stroke width for settings subtab icons */
.settings-subtabs .subtab-btn i {
    stroke-width: 2.6px !important;
}

/* Cards Sub-tabs styles */
.cards-subtabs {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 6px !important;
    padding: 4px !important;
}

.cards-subtabs::-webkit-scrollbar {
    display: none !important;
}

.cards-subtabs .cards-subtab-btn {
    flex: 0 0 auto !important;
    min-width: max-content !important;
    padding: 8px 14px !important;
    overflow: visible !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}

.cards-subtabs .cards-subtab-btn.active {
    background: rgba(128, 0, 32, 0.08) !important;
    color: var(--link-color) !important;
}

.cards-subtabs .cards-subtab-text {
    display: inline-block !important;
    max-width: none !important;
    opacity: 1 !important;
    overflow: visible !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    margin-left: 0 !important;
}

.cards-subtabs .cards-subtab-btn i {
    stroke-width: 2.6px !important;
}

/* Custom finance subtab styles */
.finance-subtabs {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 6px !important;
    padding: 4px !important;
}

.finance-subtabs::-webkit-scrollbar {
    display: none !important;
}

.finance-subtabs .finance-subtab-btn {
    flex: 0 0 auto !important;
    min-width: max-content !important;
    padding: 8px 14px !important;
    overflow: visible !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}

.finance-subtabs .finance-subtab-btn.active {
    background: rgba(128, 0, 32, 0.08) !important;
    color: var(--link-color) !important;
}

.finance-subtabs .finance-subtab-text {
    display: inline-block !important;
    max-width: none !important;
    opacity: 1 !important;
    overflow: visible !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    margin-left: 0 !important;
}

.finance-subtabs .finance-subtab-btn i {
    stroke-width: 2.6px !important;
}

/* Custom invest subtab styles */
.invest-subtabs {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 6px !important;
    padding: 4px !important;
}

.invest-subtabs::-webkit-scrollbar {
    display: none !important;
}

.invest-subtabs .invest-subtab-btn {
    flex: 0 0 auto !important;
    min-width: max-content !important;
    padding: 8px 14px !important;
    overflow: visible !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}

.invest-subtabs .invest-subtab-btn.active {
    background: rgba(128, 0, 32, 0.08) !important;
    color: var(--link-color) !important;
}

.invest-subtabs .invest-subtab-text {
    display: inline-block !important;
    max-width: none !important;
    opacity: 1 !important;
    overflow: visible !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    margin-left: 0 !important;
}

.invest-subtabs .invest-subtab-btn i {
    stroke-width: 2.6px !important;
}

/* Transaction History Popup - Item & Action Buttons */
.popup-tx-item {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    width: 100%;
    display: flex;
    align-items: stretch;
    box-sizing: border-box;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
    padding: 0;
    min-height: 52px;
}

.popup-tx-item:active {
    transform: scale(0.98);
    background: rgba(245, 240, 242, 0.95);
}

.popup-tx-opts {
    display: none;
    align-items: stretch;
    flex-shrink: 0;
    animation: slideInOpts 0.2s ease-out;
}

.popup-tx-opts>button {
    width: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-size: 7.5px;
    font-weight: 850;
    font-family: 'Outfit', sans-serif;
    gap: 2px;
    padding: 0;
    margin: 0;
    border-radius: 0;
    transition: filter 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.popup-tx-opts>button:active {
    filter: brightness(0.85);
}

.popup-tx-opts>button:last-child {
    border-radius: 0 12px 12px 0;
}

@keyframes slideInOpts {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.profile-grid-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}