@import "tailwindcss";

:root {
  --brand: #6d52df;
  --brand-hover: #593dcc;
  --brand-dark: #302660;
  --brand-soft: #eeeaff;
  --brand-softer: #f6f3ff;
  --brand-rgb: 109, 82, 223;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #f8f8fb; color: #1d1c24; font-family: Arial, Helvetica, sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.personal-app { min-height: 100vh; background: radial-gradient(circle at 78% 0%, var(--brand-softer) 0, transparent 24rem), #f8f8fb; }
.personal-header { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(28px, calc((100vw - 1120px)/2)); background: rgba(255,255,255,.86); border-bottom: 1px solid #eae9ef; backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 20; }
.personal-brand { display: flex; align-items: center; gap: 10px; color: #1d1c24; text-decoration: none; }
.personal-brand > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--brand); color: #fff; font-size: 18px; font-weight: 800; box-shadow: 0 8px 18px rgba(var(--brand-rgb),.22); }
.personal-brand strong { font-size: 22px; letter-spacing: -.07em; }
.header-right { display: flex; align-items: center; gap: 15px; }
.period-filters { display: flex; align-items: center; gap: 8px; }
.period-picker { height: 42px; min-width: 165px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid #e4e2eb; border-radius: 11px; background: #fff; }
.period-picker.year-picker { min-width: 112px; }
.period-picker > span { color: #92909c; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.period-picker select { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: #302e38; font-size: 12px; font-weight: 700; }
.personal-avatar { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px; background: var(--brand-soft); color: var(--brand); font-size: 11px; font-weight: 800; }
.theme-control { position: relative; }
.theme-button { height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid #e4e2eb; border-radius: 11px; background: #fff; color: #5f5d67; font-size: 10px; }
.theme-button > span { width: 17px; height: 17px; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #ddd9e4; }
.theme-button b { font-weight: 750; }
.theme-popover { position: absolute; top: calc(100% + 10px); right: 0; z-index: 40; width: 280px; padding: 17px; border: 1px solid #e5e3eb; border-radius: 16px; background: #fff; box-shadow: 0 18px 50px rgba(31,25,57,.16); }
.theme-popover-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.theme-popover-head > div { display: flex; flex-direction: column; gap: 4px; }.theme-popover-head strong { color: #302e38; font-size: 12px; }.theme-popover-head small { color: #8d8a96; font-size: 9px; }
.theme-popover-head > button { width: 26px; height: 26px; border: 0; border-radius: 8px; background: #f5f4f7; color: #77747f; font-size: 17px; }
.theme-swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.theme-swatches button { position: relative; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: transparent; }
.theme-swatches button > span { width: 25px; height: 25px; border: 3px solid #fff; border-radius: 8px; box-shadow: 0 0 0 1px #e0dde6; }.theme-swatches button.selected { background: var(--brand-soft); }.theme-swatches button i { position: absolute; color: #fff; font-size: 10px; font-style: normal; font-weight: 800; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.custom-color { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 11px 0; border-top: 1px solid #efedf2; border-bottom: 1px solid #efedf2; color: #6f6c77; font-size: 9px; font-weight: 700; }.custom-color > div { display: flex; align-items: center; gap: 7px; }.custom-color input { width: 29px; height: 29px; padding: 2px; border: 1px solid #ddd9e4; border-radius: 8px; background: #fff; cursor: pointer; }.custom-color strong { color: #514e58; font-size: 9px; }
.theme-reset { width: 100%; margin-top: 10px; padding: 7px; border: 0; background: transparent; color: var(--brand); font-size: 9px; font-weight: 700; }
.personal-content { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 49px 0 35px; }
.welcome-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; margin-bottom: 28px; }
.soft-label { color: var(--brand); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.welcome-row h1 { margin: 8px 0 8px; font-size: 31px; letter-spacing: -.045em; }
.welcome-row p { margin: 0; color: #7f7d88; font-size: 13px; }
.add-button, .save-button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 750; box-shadow: 0 8px 20px rgba(var(--brand-rgb),.2); transition: .18s ease; }
.add-button:hover, .save-button:hover { background: var(--brand-hover); transform: translateY(-1px); }
.add-button span { font-size: 16px; margin-right: 4px; }
.demo-note { display: flex; align-items: center; gap: 10px; margin: -10px 0 20px; padding: 11px 14px; border: 1px solid #e8e3ff; background: #f7f5ff; color: #6e63a0; border-radius: 11px; font-size: 10px; }
.demo-note > span { color: #7258dd; }.demo-note p { margin: 0; }
.balance-card { min-height: 218px; display: grid; grid-template-columns: 1.15fr 1px .85fr; align-items: center; gap: 42px; padding: 38px 44px; border-radius: 22px; background: linear-gradient(135deg, var(--brand-dark), var(--brand)); color: #fff; box-shadow: 0 22px 50px rgba(var(--brand-rgb),.18); position: relative; overflow: hidden; }
.balance-card::after { content: ""; position: absolute; width: 300px; height: 300px; right: -105px; top: -190px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; box-shadow: 0 0 0 42px rgba(255,255,255,.025), 0 0 0 86px rgba(255,255,255,.025); }
.balance-main { position: relative; z-index: 1; }
.balance-main > span { color: #c9bfff; font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.balance-main > strong { display: block; margin: 11px 0 9px; font-size: clamp(32px, 5vw, 48px); letter-spacing: -.055em; }
.balance-main > strong.negative { color: #ffcec9; }
.balance-main p { max-width: 470px; margin: 0; color: #d9d4f4; font-size: 11px; line-height: 1.5; }
.balance-divider { width: 1px; height: 120px; background: rgba(255,255,255,.15); }
.balance-flow { display: grid; gap: 22px; position: relative; z-index: 1; }
.balance-flow > div { display: flex; align-items: center; gap: 12px; }
.flow-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; font-size: 17px; }
.flow-icon.income { background: rgba(78,219,162,.15); color: #6de1b2; }.flow-icon.expense { background: rgba(255,166,157,.15); color: #ffaaa1; }
.balance-flow p { display: flex; flex-direction: column; gap: 4px; margin: 0; color: #c9c3e0; font-size: 10px; }
.balance-flow strong { color: #fff; font-size: 18px; letter-spacing: -.03em; }
.month-health { display: grid; grid-template-columns: 210px 1fr auto; align-items: center; gap: 24px; margin: 16px 0; padding: 18px 22px; border: 1px solid #e9e8ee; border-radius: 15px; background: #fff; box-shadow: 0 5px 24px rgba(37,30,72,.035); }
.health-copy { display: flex; flex-direction: column; gap: 4px; }.health-copy > span { color: #8b8994; font-size: 10px; }.health-copy > strong { color: var(--brand); font-size: 20px; }.health-copy small { color: #575560; font-size: 10px; font-weight: 500; }
.health-progress { height: 8px; overflow: hidden; border-radius: 99px; background: var(--brand-soft); }.health-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--brand-hover)); transition: width .4s ease; }
.month-health > p { margin: 0; color: #7f7d88; font-size: 10px; }
.repeat-note { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 12px 15px; border: 1px solid var(--brand-soft); border-radius: 12px; background: var(--brand-softer); color: #71699a; font-size: 10px; }
.repeat-note > span { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-size: 15px; }.repeat-note p { margin: 0; line-height: 1.45; }
.money-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.money-panel { min-width: 0; padding: 24px; border: 1px solid #e8e7ed; border-radius: 18px; background: #fff; box-shadow: 0 7px 28px rgba(37,30,72,.04); }
.money-panel-head, .money-panel-head > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.money-panel-head > div { justify-content: flex-start; }
.panel-symbol { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; font-size: 18px; }.panel-symbol.income { color: #168b60; background: #eaf8f2; }.panel-symbol.expense { color: #d75b56; background: #fff0ef; }
.money-panel h2 { margin: 0 0 4px; font-size: 15px; }.money-panel-head p { margin: 0; color: #94929d; font-size: 9px; }
.money-panel-head > button { border: 1px solid #e7e5ec; border-radius: 9px; background: #fff; color: #5f5d67; padding: 8px 10px; font-size: 9px; font-weight: 700; }
.type-totals { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 1px; overflow: hidden; margin: 22px 0 8px; border: 1px solid #eeedf2; border-radius: 12px; background: #eeedf2; }
.type-totals > div { display: flex; flex-direction: column; gap: 7px; padding: 14px; background: #fafafd; }.type-totals span { color: #96949e; font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }.type-totals strong { font-size: 12px; }.type-totals .type-total { background: var(--brand-softer); }.income .type-total strong { color: #168b60; }.expense .type-total strong { color: #d75b56; }
.paid-summary { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 12px; margin: 12px 0 2px; padding: 9px 11px; border-radius: 10px; background: #f7faf8; color: #6e7772; font-size: 9px; }.paid-summary strong { color: #17845f; font-size: 9px; }.paid-summary > i { grid-column: 1 / -1; height: 4px; overflow: hidden; border-radius: 99px; background: #e2eee8; }.paid-summary > i span { display: block; height: 100%; border-radius: inherit; background: #27a878; transition: width .25s ease; }
.entry-list { min-height: 218px; }
.entry-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; min-height: 58px; border-bottom: 1px solid #efedf2; transition: background .18s ease; }.entry-row:last-child { border-bottom: 0; }.money-panel.expense .entry-row { grid-template-columns: 28px minmax(0, 1fr) auto 58px; }.entry-row.paid { background: linear-gradient(90deg, rgba(35,164,116,.045), transparent); }
.entry-name { min-width: 0; display: flex; flex-direction: column; gap: 3px; }.entry-name strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }.entry-name small { color: #b27c46; font-size: 8px; }.entry-row.paid .entry-name small { color: #17845f; font-weight: 700; }.entry-row > b { white-space: nowrap; font-size: 11px; }
.payment-toggle { width: 23px; height: 23px; display: grid; place-items: center; padding: 0; border: 1px solid #d9d6df; border-radius: 7px; background: #fff; color: #fff; font-size: 12px; font-weight: 800; }.payment-toggle:hover { border-color: #59b894; }.payment-toggle.selected { border-color: #27a878; background: #27a878; }
.entry-value { position: relative; padding: 6px 7px; border: 0; border-radius: 8px; background: transparent; color: #24222b; white-space: nowrap; font-size: 11px; font-weight: 700; }.entry-value:hover { background: var(--brand-softer); color: var(--brand); }.entry-value i { position: absolute; top: 1px; right: 2px; color: var(--brand); font-size: 10px; font-style: normal; }
.entry-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }.entry-actions button { width: 27px; height: 27px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #aaa7b0; font-size: 13px; }.entry-actions button:hover { background: var(--brand-softer); color: var(--brand); }.entry-actions button:last-child:hover { background: #fff0ef; color: #cf514c; }
.empty-list { min-height: 218px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #96949f; }.empty-list > span { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px; background: var(--brand-softer); color: var(--brand); font-size: 18px; }.empty-list strong { margin-top: 10px; color: #4c4a54; font-size: 11px; }.empty-list p { margin: 5px 0 10px; font-size: 9px; }.empty-list button { border: 0; background: transparent; color: var(--brand); font-size: 9px; font-weight: 700; }
.personal-footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px 3px 0; color: #a09ea8; font-size: 9px; }
.personal-modal-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(22,18,38,.45); backdrop-filter: blur(5px); }
.personal-modal { width: min(460px, 100%); padding: 25px; border-radius: 19px; background: #fff; box-shadow: 0 30px 80px rgba(24,18,47,.24); }
.personal-modal.compact-modal { width: min(410px, 100%); }
.modal-title-row { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }.modal-title-row h2 { margin: 6px 0 0; font-size: 20px; letter-spacing: -.035em; }.modal-title-row > button { width: 32px; height: 32px; border: 0; border-radius: 9px; background: #f6f5f8; color: #7a7882; font-size: 20px; }
.modal-helper { margin: -6px 0 18px; color: #85828d; font-size: 10px; line-height: 1.55; }
.personal-modal form { display: flex; flex-direction: column; gap: 14px; }.personal-modal label { display: flex; flex-direction: column; gap: 7px; color: #76747e; font-size: 9px; font-weight: 700; }.personal-modal input, .installment-select { width: 100%; padding: 12px; border: 1px solid #e6e4eb; border-radius: 10px; background: #fafafd; outline: 0; font-size: 11px; }.personal-modal input:focus, .installment-select:focus { border-color: var(--brand); }
.type-choice, .variability-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.type-choice button, .variability-choice button { min-height: 43px; border: 1px solid #e7e5ec; border-radius: 10px; background: #fff; color: #76747e; font-size: 10px; font-weight: 700; }.type-choice button.selected.income { border-color: #51b58e; background: #eefaf5; color: #18855f; }.type-choice button.selected.expense { border-color: #e99591; background: #fff3f2; color: #cc554f; }
.variability-choice button { min-height: 57px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding: 0 13px; }.variability-choice button small { color: #9996a1; font-size: 8px; font-weight: 500; }.variability-choice button.selected { border-color: var(--brand); background: var(--brand-softer); color: var(--brand); }
.variability-choice.has-installment { grid-template-columns: repeat(3, 1fr); }
.installment-preview { color: var(--brand); font-size: 9px; font-weight: 700; }
.save-button { width: 100%; margin-top: 4px; }
.delete-choices { display: grid; gap: 9px; }.delete-choices button, .danger-button { width: 100%; min-height: 48px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; padding: 11px 13px; border-radius: 10px; text-align: left; }.delete-choices button small { font-size: 8px; font-weight: 500; }.month-only-button { border: 1px solid var(--brand-soft); background: var(--brand-softer); color: var(--brand); }.danger-button { border: 1px solid #f0cfcd; background: #fff4f3; color: #bd4d48; font-size: 10px; font-weight: 700; }.danger-button small { color: #9f7774; }

@media (max-width: 780px) { .personal-header { padding: 0 20px; }.personal-content { width: min(100% - 28px, 600px); padding-top: 30px; }.welcome-row { align-items: flex-start; flex-direction: column; }.welcome-row .add-button { width: 100%; }.balance-card { grid-template-columns: 1fr; gap: 24px; padding: 30px; }.balance-divider { width: 100%; height: 1px; }.balance-flow { grid-template-columns: 1fr 1fr; }.month-health { grid-template-columns: 1fr; gap: 11px; }.money-columns { grid-template-columns: 1fr; }.personal-footer { flex-direction: column; gap: 7px; }.type-totals strong { font-size: 11px; } }
@media (max-width: 500px) { .personal-header { height: 68px; padding: 0 12px; }.personal-brand strong { display: none; }.header-right { gap: 7px; }.period-filters { gap: 5px; }.period-picker { min-width: 0; padding: 0 8px; gap: 5px; }.period-picker.year-picker { min-width: 87px; }.period-picker > span { font-size: 8px; }.period-picker select { font-size: 10px; }.theme-button { width: 39px; padding: 0; justify-content: center; }.theme-button b { display: none; }.theme-popover { right: -4px; width: min(280px, calc(100vw - 24px)); }.personal-content { width: calc(100% - 22px); }.welcome-row h1 { font-size: 27px; }.balance-card { padding: 25px 22px; border-radius: 17px; }.balance-flow { grid-template-columns: 1fr; }.money-panel { padding: 18px; }.money-panel-head { align-items: flex-start; }.money-panel-head > button { padding: 8px; }.type-totals { grid-template-columns: 1fr; }.entry-list { min-height: 160px; }.empty-list { min-height: 160px; }.personal-modal { padding: 20px; }.personal-avatar { display: none; }.variability-choice.has-installment { grid-template-columns: 1fr; }.money-panel.expense .entry-row { grid-template-columns: 25px minmax(0, 1fr) auto 29px; gap: 7px; }.money-panel.expense .entry-actions button:first-child { display: none; }.entry-actions { width: 29px; } }
