/* Money Manager V2 - Wallet System Theme */
:root {
    --wallet-blue-bg: linear-gradient(135deg, #0ea5e9, #0284c7);
    --wallet-green-bg: linear-gradient(135deg, #10b981, #059669);
    --wallet-dark-bg: linear-gradient(135deg, #334155, #1e293b);
    --wallet-purple-bg: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.money-container {
    padding: 32px 48px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header V2 */
.money-header-v2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.header-info .subtitle {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.header-info .grand-total {
    font-size: 42px;
    font-weight: 800;
    color: #fbbf24;
    /* Gold */
    line-height: 1;
}

.toggle-eye {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
    cursor: pointer;
    vertical-align: middle;
    margin-left: 12px;
}

/* Wallet Grid */
.section-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 16px;
    text-transform: uppercase;
}

.wallet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

.wallet-card {
    border-radius: 20px;
    padding: 24px;
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.wallet-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.wallet-card.active-ring {
    box-shadow: 0 0 0 4px white, 0 0 0 7px #fbbf24;
    transform: translateY(-5px);
    z-index: 10;
}

.active-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: white;
    color: #fbbf24;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.active-badge i {
    width: 14px;
    height: 14px;
    stroke-width: 3;
}

/* Themes */
.wallet-card.theme-blue {
    background: var(--wallet-blue-bg);
    box-shadow: 0 10px 20px rgba(14, 165, 233, 0.3);
}

.wallet-card.theme-green {
    background: var(--wallet-green-bg);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.wallet-card.theme-dark {
    background: var(--wallet-dark-bg);
    box-shadow: 0 10px 20px rgba(30, 41, 59, 0.3);
}

.wallet-card.theme-purple {
    background: var(--wallet-purple-bg);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
}

.wallet-card.theme-orange {
    background: linear-gradient(135deg, #f97316, #ea580c);
    box-shadow: 0 10px 20px rgba(249, 115, 22, 0.3);
}

.wallet-card.theme-pink {
    background: linear-gradient(135deg, #ec4899, #db2777);
    box-shadow: 0 10px 20px rgba(236, 72, 153, 0.3);
}

.wallet-card.theme-teal {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
    box-shadow: 0 10px 20px rgba(20, 184, 166, 0.3);
}

.wallet-card.theme-red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

.wallet-card.theme-gold {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 10px 20px rgba(251, 191, 36, 0.3);
}

.wallet-card.theme-indigo {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.wallet-card.theme-lime {
    background: linear-gradient(135deg, #84cc16, #65a30d);
    box-shadow: 0 10px 20px rgba(132, 204, 22, 0.3);
}

.wallet-card.theme-cyan {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    box-shadow: 0 10px 20px rgba(6, 182, 212, 0.3);
}

.wallet-card.dashed-add {
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    align-items: center;
    justify-content: center;
    box-shadow: none;
    transition: all 0.3s ease;
}

.wallet-card.dashed-add:hover {
    border-color: #fbbf24;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.05);
    transform: translateY(-5px);
}

.card-icon-bubble {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.card-details {
    margin-top: auto;
}

.wallet-name {
    display: block;
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 4px;
    text-transform: uppercase;
    font-weight: 600;
}

.wallet-balance {
    display: block;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-card {
    background: white;
    padding: 32px;
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-card h3 {
    font-size: 20px;
    margin-bottom: 24px;
    color: #0f172a;
}

.color-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.color-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.color-options label:hover {
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.05);
}

.color-options input[type="radio"]:checked+label,
.color-options label:has(input[type="radio"]:checked) {
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    font-weight: 600;
}

/* Helper Buttons */
.btn-primary {
    background: #fbbf24;
    color: #0f172a;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-primary:active {
    transform: scale(0.96);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

.btn-text-sm {
    background: none;
    border: none;
    color: #0ea5e9;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    margin-left: 12px;
    opacity: 0.8;
}

.btn-text-sm:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Premium Floating Action Button */
.btn-action-premium {
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #0f172a;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 24px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
}

.btn-action-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.5);
}

.btn-action-premium:active {
    transform: translateY(1px);
}

/* Split View for Transactions */
.money-split-view {
    display: flex;
    gap: 24px;
}

.empty-state-money {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
    border: 1px dashed var(--border);
    border-radius: 12px;
}

/* Transaction List overrides */
.transaction-item {
    padding: 16px;
    background: var(--bg-main);
    border-radius: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.t-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
}

.t-left {
    display: flex;
    align-items: center;
}

/* Lock Screen Premium */
.money-blur-container {
    position: relative;
    width: 100%;
    height: 80vh;
    /* Fill reasonable space */
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: #0f172a;
    /* Fallback */
}

/* Dynamic Animated Background */
.blur-bg {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(79, 70, 229, 0.4), transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.3), transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(34, 211, 238, 0.3), transparent 40%);
    animation: bgRotate 15s linear infinite;
    z-index: 0;
}

@keyframes bgRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.lock-overlay {
    position: relative;
    z-index: 10;
    padding: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.lock-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 60px 40px;
    border-radius: 32px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    animation: floatCard 6s ease-in-out infinite;
    transform-style: preserve-3d;
}

@keyframes floatCard {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.lock-icon-circle {
    width: 80px;
    height: 80px;
    background: rgba(251, 191, 36, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.2);
    border: 2px solid rgba(251, 191, 36, 0.3);
}

.lock-icon-circle i {
    color: #fbbf24;
    width: 36px !important;
    height: 36px !important;
}

.lock-card h2 {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(to right, #fff, #cecece);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.lock-card p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.lock-card .btn-primary {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 16px;
    margin-top: 10px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
}

.lock-card .btn-primary:hover {
    box-shadow: 0 15px 30px rgba(245, 158, 11, 0.5);
    transform: translateY(-2px);
}

/* 
 * PIN THEME: Money Gold 
 * Explicitly overriding styles for Money Mode 
 */
.pin-overlay.theme-money-gold .pin-card {
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    box-shadow: 0 25px 50px -12px rgba(251, 191, 36, 0.25);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.pin-overlay.theme-money-gold h2 {
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.pin-overlay.theme-money-gold .icon-circle i {
    color: #fbbf24;
}

.pin-overlay.theme-money-gold .icon-circle {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
}

.pin-overlay.theme-money-gold .pin-dot.filled {
    background: #fbbf24;
    box-shadow: 0 0 10px #fbbf24;
}

/* Keypad Buttons for Money Theme */
.pin-keyboard.theme-money-gold .key {
    background: rgba(255, 255, 255, 0.05);
    /* Darker keys */
    border: 1px solid rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    /* Gold Text */
}

.pin-keyboard.theme-money-gold .key:hover {
    background: rgba(251, 191, 36, 0.2);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.2);
}

.pin-keyboard.theme-money-gold .key:active {
    background: #fbbf24;
    color: #000;
}