/* yesan.xyz - Playful Budget Bento Box */
/* Colors: #FFF8F0, #E8621A, #F5C842, #6BAA7A, #F07B6E, #2E1A0E, #7A5C40, #FFF0E0 */

:root {
    --cream: #FFF8F0;
    --burnt-orange: #E8621A;
    --sunshine: #F5C842;
    --sage: #6BAA7A;
    --coral: #F07B6E;
    --deep-brown: #2E1A0E;
    --medium-tan: #7A5C40;
    --pale-peach: #FFF0E0;
    --sidebar-width: 200px;
}

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

body {
    font-family: 'Commissioner', sans-serif;
    background-color: var(--cream);
    color: var(--deep-brown);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.annotation {
    font-family: 'Patrick Hand', cursive;
}

/* Geometric Background */
.geometric-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.geo-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.geo-shape.square {
    border-radius: 4px;
}

.geo-shape.triangle {
    border-radius: 0;
    width: 0 !important;
    height: 0 !important;
    background: none !important;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 35px solid currentColor;
    opacity: 0.08;
}

@keyframes gentleDrift {
    0%, 100% { transform: translate(0, 0) rotate(var(--rot, 0deg)); }
    25% { transform: translate(10px, -15px) rotate(calc(var(--rot, 0deg) + 5deg)); }
    50% { transform: translate(-5px, 10px) rotate(calc(var(--rot, 0deg) + 10deg)); }
    75% { transform: translate(15px, 5px) rotate(calc(var(--rot, 0deg) - 5deg)); }
}

@keyframes gentleSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--pale-peach);
    border-right: 1px solid rgba(46, 26, 14, 0.08);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    z-index: 100;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin-bottom: 32px;
}

.logo-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--burnt-orange);
    display: block;
    flex-shrink: 0;
}

.logo-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--deep-brown);
}

.sidebar-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    color: var(--medium-tan);
}

.nav-item:hover {
    background: rgba(232, 98, 26, 0.06);
    color: var(--deep-brown);
}

.nav-item.active {
    background: rgba(232, 98, 26, 0.12);
    color: var(--burnt-orange);
    font-weight: 600;
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-label {
    font-size: 0.9rem;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 32px 40px;
    padding-bottom: 40px;
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(46, 26, 14, 0.06);
}

.page-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--deep-brown);
    line-height: 1.2;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--medium-tan);
    margin-top: 4px;
}

.total-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.total-label {
    font-size: 1rem;
    color: var(--medium-tan);
}

.total-amount {
    font-family: 'Poppins', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--burnt-orange);
    font-variant-numeric: tabular-nums;
}

/* View Panels */
.view-panel {
    display: none;
}

.view-panel.active {
    display: block;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    max-width: 1200px;
}

.bento-cell {
    background: white;
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(46, 26, 14, 0.04);
}

.bento-cell:hover {
    transform: scale(1.02) rotate(var(--rotation, 0deg));
    box-shadow: 0 8px 24px rgba(46, 26, 14, 0.08);
}

/* Slide-reveal animation */
.bento-cell[data-reveal] .cell-content {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 350ms ease-out, transform 350ms ease-out;
}

.bento-cell[data-reveal].revealed .cell-content {
    opacity: 1;
    transform: translateX(0);
}

/* Cell Sizes */
.cell-hero {
    grid-column: span 4;
    grid-row: span 1;
}

.cell-tall {
    grid-column: span 2;
    grid-row: span 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cell-wide {
    grid-column: span 3;
}

.cell-wide-tall {
    grid-column: span 3;
    grid-row: span 2;
}

.cell-medium {
    grid-column: span 3;
}

.cell-small {
    grid-column: span 2;
}

/* Category Borders */
.category-orange {
    border-left: 4px solid var(--burnt-orange);
}

.category-yellow {
    border-left: 4px solid var(--sunshine);
}

.category-green {
    border-left: 4px solid var(--sage);
}

.category-coral {
    border-left: 4px solid var(--coral);
}

/* Cell Content */
.cell-content {
    position: relative;
    z-index: 2;
}

.cell-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.cell-annotation {
    font-size: 1.1rem;
    color: var(--medium-tan);
    display: block;
    margin-bottom: 4px;
}

.cell-number {
    font-family: 'Poppins', sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--deep-brown);
    display: block;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    margin-bottom: 8px;
}

.cell-number-lg {
    font-size: 3.8rem;
}

.cell-caption {
    font-size: 0.85rem;
    color: var(--medium-tan);
    display: block;
    margin-top: 4px;
}

.success-text {
    color: var(--sage);
    font-weight: 600;
}

/* Category Dots */
.category-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.dot-orange { background: var(--burnt-orange); }
.dot-yellow { background: var(--sunshine); }
.dot-green { background: var(--sage); }
.dot-coral { background: var(--coral); }

/* Progress Bars */
.cell-bar {
    width: 100%;
    height: 8px;
    background: var(--pale-peach);
    border-radius: 4px;
    overflow: hidden;
    margin: 8px 0;
}

.cell-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--burnt-orange);
    width: 0%;
    transition: width 1s ease-out;
}

.bar-yellow { background: var(--sunshine); }
.bar-coral { background: var(--coral); }
.bar-orange { background: var(--burnt-orange); }

/* Collage Corners */
.collage-corner {
    position: absolute;
    width: 80px;
    height: 80px;
    opacity: 0.15;
    border: 3px solid var(--burnt-orange);
    border-radius: 4px;
}

.collage-corner-tr {
    top: -8px;
    right: -8px;
    transform: rotate(3deg);
}

.collage-corner-bl {
    bottom: -8px;
    left: -8px;
    transform: rotate(-2deg);
}

.collage-patch {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 60px;
    height: 60px;
    background: var(--sunshine);
    opacity: 0.1;
    border-radius: 8px;
    transform: rotate(5deg);
}

/* Savings Circle */
.savings-circle {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 12px auto;
}

.savings-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring-bg {
    stroke: var(--pale-peach);
}

.ring-fill {
    stroke: var(--sage);
    transition: stroke-dashoffset 1.5s ease-out;
    stroke-linecap: round;
}

.savings-percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--sage);
}

/* Tip Cell */
.cell-tip {
    background: var(--pale-peach);
    border-left: 4px solid var(--sunshine);
}

.tip-emoji {
    font-size: 1.6rem;
    display: block;
    margin-bottom: 8px;
}

.tip-text {
    font-size: 1.05rem;
    color: var(--medium-tan);
    line-height: 1.5;
}

/* Transaction List */
.transaction-list {
    list-style: none;
    margin-top: 12px;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(46, 26, 14, 0.06);
}

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

.tx-icon {
    font-size: 1.4rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pale-peach);
    border-radius: 10px;
    flex-shrink: 0;
}

.tx-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tx-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--deep-brown);
}

.tx-date {
    font-size: 0.75rem;
    color: var(--medium-tan);
}

.tx-amount {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--coral);
    font-variant-numeric: tabular-nums;
}

/* Mini Chart */
.mini-chart {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 140px;
    padding-top: 16px;
    margin-top: 12px;
}

.chart-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}

.chart-bar::before {
    content: '';
    width: 100%;
    max-width: 40px;
    border-radius: 6px 6px 0 0;
    background: var(--bar-color, var(--burnt-orange));
    transition: height 1s ease-out;
    height: 0%;
}

.chart-bar.animated::before {
    height: calc(var(--bar-height, 0) * 1%);
}

.chart-label {
    font-family: 'Patrick Hand', cursive;
    font-size: 0.8rem;
    color: var(--medium-tan);
    margin-top: 6px;
}

.active-bar .chart-label {
    color: var(--burnt-orange);
    font-weight: 600;
}

/* Settings */
.settings-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(46, 26, 14, 0.06);
    gap: 8px;
}

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

.settings-label {
    font-size: 0.9rem;
    color: var(--medium-tan);
    flex: 1;
}

.settings-value {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--deep-brown);
}

.toggle-on {
    color: var(--sage);
}

/* Bottom Navigation (mobile) */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid rgba(46, 26, 14, 0.08);
    padding: 8px 0;
    z-index: 100;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 4px;
    color: var(--medium-tan);
    font-family: 'Commissioner', sans-serif;
    font-size: 0.65rem;
    transition: color 0.2s ease;
}

.bottom-nav-item .nav-icon {
    width: 22px;
    height: 22px;
}

.bottom-nav-item.active {
    color: var(--burnt-orange);
}

.bottom-nav-item:hover {
    color: var(--deep-brown);
}

/* Responsive */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .cell-hero {
        grid-column: span 4;
    }
    .cell-tall {
        grid-column: span 2;
    }
    .cell-wide {
        grid-column: span 2;
    }
    .cell-wide-tall {
        grid-column: span 2;
    }
    .cell-medium {
        grid-column: span 2;
    }
    .cell-small {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    .main-content {
        margin-left: 0;
        padding: 20px 16px;
        padding-bottom: 80px;
    }
    .bottom-nav {
        display: flex;
    }
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .cell-hero {
        grid-column: span 2;
    }
    .cell-tall {
        grid-column: span 1;
        grid-row: span 1;
    }
    .cell-wide {
        grid-column: span 2;
    }
    .cell-wide-tall {
        grid-column: span 2;
        grid-row: span 1;
    }
    .cell-medium {
        grid-column: span 2;
    }
    .cell-small {
        grid-column: span 1;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .header-right {
        align-self: flex-start;
    }
    .total-badge {
        align-items: flex-start;
    }
    .page-title {
        font-size: 1.6rem;
    }
    .total-amount {
        font-size: 1.8rem;
    }
    .cell-number {
        font-size: 2rem;
    }
    .cell-number-lg {
        font-size: 2.6rem;
    }
    .bento-cell {
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .cell-tall {
        grid-column: span 2;
    }
    .cell-small {
        grid-column: span 2;
    }
}
