body {
    margin: 0;
    background: #dfe7f2;
    font-family: Arial;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.phone {
    width: 360px;
    height: 720px;
    background: #f5f7fb;
    border-radius: 30px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.header {
    background: #003f88;
    color: white;
    padding: 15px;
    text-align: center;
}

.screen {
    flex: 1;
    display: none;
    padding: 10px;
    overflow-y: auto;
}
.active { display: block; }

.card {
    background: white;
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.footer {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: white;
}

.btn {
    padding: 10px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
}
.primary  { background: #003f88; color: white; }
.secondary { background: #ccc; }

/* Bars */
.bar  { background: #eee; border-radius: 10px; margin-bottom: 8px; }
.fill { height: 18px; color: white; text-align: center; font-size: 12px; }

/* Clickable feature */
.feature {
    text-align: center;
    cursor: pointer;
}
.feature:hover { transform: scale(1.05); }

input, select {
    width: 100%;
    padding: 8px;
    margin: 5px 0;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    font-size: 14px;
}

.transaction {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    line-height: 1.5;
}

.filterBtn {
    padding: 6px 10px;
    border: none;
    border-radius: 10px;
    background: #e0e7ff;
    cursor: pointer;
    font-size: 13px;
}
.filterBtn.active {
    background: #003f88;
    color: white;
}

/* Category Dropdown */

.cat-dropdown-wrapper {
    position: relative;
    margin: 6px 0 2px;
    user-select: none;
}

/* The "selected" box that the user sees and taps */
.cat-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border: 2px solid #003f88;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: #003f88;
    transition: background 0.15s;
}
.cat-selected:hover { background: #eef3fb; }

.cat-arrow {
    font-size: 16px;
    transition: transform 0.2s;
    color: #003f88;
}
.cat-arrow.open { transform: rotate(180deg); }

/* Auto-tag badge shown inside the selected box */
.cat-auto-badge {
    font-size: 10px;
    background: #e3f0ff;
    color: #003f88;
    border-radius: 6px;
    padding: 2px 6px;
    margin-left: 8px;
    font-weight: normal;
    white-space: nowrap;
}

/* The dropdown list */
.cat-options {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d0daf0;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,63,136,0.15);
    z-index: 999;
    max-height: 220px;
    overflow-y: auto;
    padding: 6px 0;
}
.cat-options.open { display: block; }

/* Each option row */
.cat-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.1s;
    color: #222;
}
.cat-option:hover    { background: #eef3fb; }
.cat-option.active   {
    background: #003f88;
    color: white;
}
.cat-option.active .cat-opt-emoji { filter: none; }

.cat-opt-emoji { font-size: 16px; min-width: 20px; text-align: center; }
.cat-opt-label { flex: 1; }

/* Small "Auto" pill that appears next to the suggested option */
.cat-auto-pill {
    font-size: 10px;
    background: #fff3cd;
    color: #856404;
    border-radius: 6px;
    padding: 2px 6px;
    font-weight: bold;
}
.cat-option.active .cat-auto-pill {
    background: rgba(255,255,255,0.25);
    color: white;
}