:root {
    color-scheme: light;
    --ink: #172421;
    --muted: #6f7d79;
    --line: #dfe6e2;
    --canvas: #f3f6f3;
    --panel: #ffffff;
    --forest: #173c36;
    --forest-deep: #102d29;
    --mint: #dff4e8;
    --mint-strong: #2f8a67;
    --lime: #c8f16d;
    --red: #bd4e4e;
    --red-soft: #fbe9e7;
    --gold: #c4932f;
    --gold-soft: #fff4d9;
    --blue: #39779b;
    --blue-soft: #e6f2f8;
    --radius-lg: 22px;
    --radius-md: 15px;
    --shadow: 0 10px 30px rgba(19, 53, 47, 0.065);
}

* {
    box-sizing: border-box;
}

.ui-icon-sprite {
    height: 0;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
    width: 0;
}

.ui-icon {
    display: block;
    fill: none;
    flex: 0 0 auto;
    height: 1em;
    overflow: visible;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
    width: 1em;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 18px;
}

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select {
    color: inherit;
    font: inherit;
}

button,
select {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

.sr-only {
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.app-shell {
    min-height: 100vh;
}

.sidebar {
    align-items: stretch;
    background: var(--forest-deep);
    color: #fff;
    display: flex;
    flex-direction: column;
    inset: 0 auto 0 0;
    padding: 30px 20px 24px;
    position: fixed;
    width: 248px;
    z-index: 10;
}

.brand {
    align-items: center;
    display: flex;
    gap: 12px;
    margin: 0 10px 44px;
}

.brand-mark {
    align-items: center;
    background: var(--lime);
    border-radius: 12px;
    color: var(--forest-deep);
    display: flex;
    font-family: Georgia, serif;
    font-size: 25px;
    font-weight: 800;
    height: 43px;
    justify-content: center;
    transform: rotate(-3deg);
    width: 43px;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 17px;
    letter-spacing: -0.02em;
}

.brand small {
    color: #9db5ae;
    font-size: 11px;
    margin-top: 3px;
}

.main-nav {
    display: grid;
    gap: 7px;
}

.main-nav a,
.main-nav button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 11px;
    color: #b7cbc5;
    display: flex;
    font-size: 14px;
    font-weight: 600;
    gap: 12px;
    padding: 12px 14px;
    text-align: left;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
    width: 100%;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav button:hover,
.main-nav button:focus-visible {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    outline: none;
    transform: translateX(2px);
}

.main-nav a.is-active,
.main-nav button.is-active {
    background: #265148;
    color: #fff;
}

.main-nav a span,
.main-nav button span {
    color: var(--lime);
    font-size: 19px;
    text-align: center;
    width: 20px;
}

.sidebar-note {
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding: 14px;
}

.sidebar-note strong {
    font-size: 12px;
}

.sidebar-note p {
    color: #9db5ae;
    font-size: 10px;
    line-height: 1.5;
    margin: 4px 0 0;
}

.mobile-top-actions {
    display: none;
}

.status-dot {
    background: var(--lime);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(200, 241, 109, 0.12);
    flex: 0 0 auto;
    height: 7px;
    margin-top: 6px;
    width: 7px;
}

.content {
    margin-left: 248px;
    max-width: 1700px;
    min-height: 100vh;
    padding: 38px 42px 22px;
}

.page-header {
    align-items: flex-end;
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
}

.eyebrow {
    color: #899692;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    margin: 0 0 7px;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(32px, 3vw, 44px);
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 8px;
}

h2 {
    font-size: 18px;
    letter-spacing: -0.025em;
    margin-bottom: 0;
}

.header-copy {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 0;
}

.primary-shortcut {
    align-items: center;
    background: var(--forest);
    border-radius: 11px;
    box-shadow: 0 7px 18px rgba(23, 60, 54, 0.18);
    color: #fff;
    display: flex;
    font-size: 13px;
    font-weight: 700;
    gap: 8px;
    padding: 12px 16px;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.primary-shortcut:hover,
.primary-shortcut:focus-visible {
    box-shadow: 0 10px 24px rgba(23, 60, 54, 0.24);
    outline: none;
    transform: translateY(-2px);
}

.primary-shortcut .ui-icon {
    color: var(--lime);
    font-size: 18px;
}

.header-actions {
    align-items: center;
    display: flex;
    gap: 10px;
}

.user-chip {
    align-items: center;
    background: #fff;
    border: 1px solid #dfe6e2;
    border-radius: 12px;
    display: flex;
    gap: 9px;
    min-height: 43px;
    padding: 5px 6px 5px 7px;
}

.user-avatar {
    align-items: center;
    background: var(--mint);
    border-radius: 9px;
    color: #2d7358;
    display: flex;
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 900;
    height: 30px;
    justify-content: center;
    letter-spacing: 0.03em;
    width: 30px;
}

.user-chip > span:nth-child(2) {
    display: grid;
    gap: 1px;
    min-width: 92px;
}

.user-chip strong {
    font-size: 9px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-chip small {
    color: #8a9793;
    font-size: 8px;
}

.user-chip form {
    display: flex;
}

.user-chip button {
    align-items: center;
    background: #f2f5f3;
    border: 0;
    border-radius: 8px;
    color: #71817c;
    display: flex;
    font-size: 14px;
    height: 30px;
    justify-content: center;
    transition: background 160ms ease, color 160ms ease;
    width: 30px;
}

.user-chip button:hover,
.user-chip button:focus-visible {
    background: var(--red-soft);
    color: var(--red);
    outline: none;
}

.flash {
    align-items: center;
    border-radius: 13px;
    display: flex;
    gap: 11px;
    margin-bottom: 18px;
    padding: 13px 15px;
}

.flash > span {
    align-items: center;
    border-radius: 50%;
    display: flex;
    flex: 0 0 auto;
    font-weight: 800;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.flash p {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    margin: 0;
}

.flash button {
    align-items: center;
    background: none;
    border: 0;
    display: flex;
    font-size: 20px;
    justify-content: center;
    opacity: 0.55;
    padding: 4px;
}

.flash--success {
    background: #e5f5eb;
    border: 1px solid #b8dfc7;
    color: #256746;
}

.flash--success > span {
    background: #c9ead5;
}

.flash--error {
    background: var(--red-soft);
    border: 1px solid #f0c7c2;
    color: #8e3838;
}

.flash--error > span {
    background: #f2c8c3;
}

.app-toast {
    animation: toast-in 240ms ease-out both;
    box-shadow: 0 16px 42px rgba(16, 45, 41, 0.18);
    margin: 0;
    max-width: 460px;
    overflow: hidden;
    position: fixed;
    right: 22px;
    top: 20px;
    width: calc(100vw - 44px);
    z-index: 1000;
}

.app-toast::after {
    animation: toast-progress 2.5s linear forwards;
    background: currentColor;
    bottom: 0;
    content: "";
    height: 2px;
    left: 0;
    opacity: 0.24;
    position: absolute;
    width: 100%;
}

.app-toast.flash--error::after {
    animation-duration: 4s;
}

.app-toast:hover::after {
    animation-play-state: paused;
}

.app-toast.is-hiding {
    animation: toast-out 220ms ease-in forwards;
    pointer-events: none;
}

.app-toast button {
    border-radius: 7px;
    flex: 0 0 auto;
    height: 28px;
    line-height: 1;
    padding: 0;
    width: 28px;
}

.app-toast button:hover,
.app-toast button:focus-visible {
    background: rgba(255, 255, 255, 0.48);
    opacity: 1;
    outline: none;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-9px) scale(0.98);
    }
}

@keyframes toast-progress {
    from {
        width: 100%;
    }
    to {
        width: 0;
    }
}

.balance-grid {
    display: grid;
    gap: 13px;
    grid-template-columns: 1.18fr repeat(4, 1fr);
    margin-bottom: 18px;
}

.balance-card {
    background: var(--panel);
    border: 1px solid #e4eae7;
    border-radius: var(--radius-md);
    box-shadow: 0 5px 18px rgba(19, 53, 47, 0.035);
    min-width: 0;
    overflow: hidden;
    padding: 17px 17px 13px;
    position: relative;
}

.balance-card::after {
    background: linear-gradient(90deg, transparent, rgba(47, 138, 103, 0.12), transparent);
    bottom: 0;
    content: "";
    height: 2px;
    left: 0;
    opacity: 0;
    position: absolute;
    transition: opacity 160ms ease;
    width: 100%;
}

.balance-card:hover::after {
    opacity: 1;
}

.balance-card--primary {
    background: var(--forest);
    border-color: var(--forest);
    color: #fff;
}

.balance-card--primary::before {
    background: rgba(200, 241, 109, 0.07);
    border-radius: 50%;
    content: "";
    height: 140px;
    position: absolute;
    right: -60px;
    top: -65px;
    width: 140px;
}

.balance-card__top,
.balance-card__footer {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.currency-badge {
    align-items: center;
    background: #eef2f0;
    border-radius: 8px;
    color: #344f49;
    display: flex;
    font-size: 9px;
    font-weight: 900;
    height: 28px;
    justify-content: center;
    letter-spacing: 0.04em;
    width: 34px;
}

.currency-badge--try {
    background: var(--lime);
    color: var(--forest-deep);
}

.currency-badge--usd {
    background: #e5f2e8;
    color: #326b43;
}

.currency-badge--eur {
    background: #e8eefc;
    color: #3e5f9b;
}

.currency-badge--cad {
    background: #fbe8e5;
    color: #a94b42;
}

.currency-badge--gbp {
    background: #f0e9f8;
    color: #76549a;
}

.balance-status {
    align-items: center;
    color: #8b9995;
    display: flex;
    font-size: 9px;
    font-weight: 700;
    gap: 5px;
}

.balance-card--primary .balance-status {
    color: #b7d0c9;
}

.balance-status i {
    background: #61b585;
    border-radius: 50%;
    height: 5px;
    width: 5px;
}

.balance-card__body {
    margin: 18px 0 14px;
}

.balance-card__body p {
    color: #788783;
    font-size: 10px;
    font-weight: 700;
    margin: 0 0 6px;
}

.balance-card--primary .balance-card__body p {
    color: #b7d0c9;
}

.balance-card__body strong {
    display: block;
    font-size: clamp(18px, 1.5vw, 25px);
    letter-spacing: -0.04em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.balance-card__body strong small {
    font-size: 0.58em;
    font-weight: 700;
    margin-right: 3px;
}

.balance-card--primary .balance-card__body {
    margin-bottom: 9px;
}

.balance-card__portfolio {
    align-items: center;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin-bottom: 9px;
    min-height: 30px;
    padding: 5px 6px 5px 8px;
}

.balance-card__portfolio-content {
    display: grid;
    gap: 4px;
    min-width: 0;
    width: 100%;
}

.balance-card__portfolio-total {
    align-items: baseline;
    display: flex;
    gap: 6px;
    min-width: 0;
}

.balance-card__portfolio-total small {
    color: #9dbdb5;
    font-size: 7px;
    font-weight: 700;
    white-space: nowrap;
}

.balance-card__portfolio-total b {
    color: #fff;
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.balance-card__portfolio-breakdown {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 4px;
}

.balance-card__portfolio-breakdown-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
}

.balance-card__portfolio-breakdown-heading > span {
    color: #87a79e;
    font-size: 6px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.balance-card__portfolio-breakdown-heading small {
    color: #789b91;
    font-size: 5px;
}

.balance-card__portfolio-breakdown ul {
    display: grid;
    gap: 3px;
    list-style: none;
    margin: 0;
    max-height: 72px;
    overflow: hidden;
    overflow-y: auto;
    padding: 0 2px 0 0;
    scrollbar-color: rgba(200, 241, 109, 0.35) transparent;
    scrollbar-width: thin;
}

.balance-card__portfolio-breakdown li {
    align-items: center;
    background: rgba(255, 255, 255, 0.045);
    border-radius: 5px;
    display: grid;
    gap: 1px 4px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 3px 4px;
}

.valuation-currency {
    color: var(--lime);
    font-size: 7px;
    font-weight: 900;
    grid-row: span 2;
}

.valuation-formula {
    color: #b4cac4;
    font-size: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.balance-card__portfolio-breakdown li > b {
    color: #fff;
    font-size: 7px;
    font-weight: 800;
    white-space: nowrap;
}

.balance-card__portfolio-breakdown li > small {
    color: #73968c;
    font-size: 5px;
    grid-column: 2 / -1;
}

.balance-card__portfolio-breakdown > p {
    color: #87a79e;
    font-size: 6px;
    margin: 2px 0 0;
}

.balance-card__portfolio a {
    align-self: flex-start;
    align-items: center;
    background: rgba(200, 241, 109, 0.12);
    border-radius: 6px;
    color: var(--lime);
    display: inline-flex;
    flex: 0 0 21px;
    font-size: 13px;
    height: 21px;
    justify-content: center;
    text-decoration: none;
}

.balance-card__portfolio a:hover {
    background: rgba(200, 241, 109, 0.2);
}

.balance-card__footer {
    border-top: 1px solid #edf1ef;
    color: #96a19e;
    font-size: 8px;
    font-weight: 700;
    padding-top: 10px;
}

.balance-card--primary .balance-card__footer {
    border-color: rgba(255, 255, 255, 0.12);
    color: #9dbdb5;
}

.panel {
    background: var(--panel);
    border: 1px solid #e2e8e5;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.workspace-grid {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.72fr);
    scroll-margin-top: 18px;
}

.transaction-panel {
    padding: 23px;
}

.panel-heading,
.history-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.secure-label {
    align-items: center;
    color: #8c9995;
    display: flex;
    font-size: 9px;
    font-weight: 700;
    gap: 5px;
}

.secure-label i {
    color: var(--mint-strong);
    font-size: 20px;
    line-height: 0;
}

.action-tabs {
    background: #f1f4f2;
    border-radius: 12px;
    display: grid;
    gap: 4px;
    grid-template-columns: 1fr 1fr;
    margin: 19px 0;
    padding: 4px;
}

.action-tabs button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 9px;
    color: #7f8d89;
    display: flex;
    font-size: 12px;
    font-weight: 700;
    gap: 8px;
    justify-content: center;
    padding: 10px;
}

.action-tabs button.is-active {
    background: #fff;
    box-shadow: 0 3px 10px rgba(22, 51, 45, 0.07);
    color: var(--forest);
}

.action-tabs button .ui-icon {
    font-size: 16px;
}

.tab-panel[hidden] {
    display: none;
}

.flow-switch {
    display: grid;
    gap: 9px;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 16px;
}

.flow-switch button {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 11px;
    display: flex;
    font-size: 12px;
    font-weight: 700;
    gap: 8px;
    justify-content: center;
    padding: 10px;
}

.flow-switch button .ui-icon {
    align-items: center;
    background: #edf2f0;
    border-radius: 50%;
    display: flex;
    padding: 4px;
    height: 22px;
    justify-content: center;
    width: 22px;
}

.flow-switch button.is-active[data-flow-type="income"] {
    background: #edf8f1;
    border-color: #9fd3b2;
    color: #28754d;
}

.flow-switch button.is-active[data-flow-type="income"] .ui-icon {
    background: #cdebd8;
}

.flow-switch button.is-active[data-flow-type="expense"] {
    background: var(--red-soft);
    border-color: #eab7b1;
    color: #9c4141;
}

.flow-switch button.is-active[data-flow-type="expense"] .ui-icon {
    background: #f3cec9;
}

.transaction-form {
    display: grid;
    gap: 14px;
}

.field-row {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-row--three {
    grid-template-columns: 1.1fr 0.9fr 0.9fr;
}

.field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.field > span:first-child {
    color: #4c5e59;
    font-size: 10px;
    font-weight: 800;
}

.field > span em {
    color: #9ba6a3;
    font-size: 9px;
    font-style: normal;
    font-weight: 500;
}

.field input,
.field select,
.filters select {
    background: #fbfcfb;
    border: 1px solid #dce4e0;
    border-radius: 10px;
    height: 42px;
    min-width: 0;
    outline: none;
    padding: 0 12px;
    width: 100%;
}

.field input[type="date"],
.field input[type="datetime-local"],
.filter-date input[type="date"] {
    display: block;
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
    width: 100%;
}

.field input[type="date"]::-webkit-date-and-time-value,
.field input[type="datetime-local"]::-webkit-date-and-time-value,
.filter-date input[type="date"]::-webkit-date-and-time-value {
    min-width: 0;
    text-align: left;
}

.field input::placeholder {
    color: #adb8b4;
}

.field input:focus,
.field select:focus,
.filters select:focus {
    background: #fff;
    border-color: #5b9b83;
    box-shadow: 0 0 0 3px rgba(91, 155, 131, 0.12);
}

.datetime-control {
    background: #fbfcfb;
    border: 1px solid #dce4e0;
    border-radius: 10px;
    cursor: pointer;
    display: block;
    height: 42px;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.datetime-control__value {
    color: #334b45;
    display: block;
    font-size: 14px;
    left: 12px;
    line-height: 1;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
    right: 42px;
    text-align: left;
    text-overflow: ellipsis;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    z-index: 1;
}

.datetime-control__value.is-placeholder {
    color: #adb8b4;
}

.datetime-control__icon {
    align-items: center;
    color: #72817d;
    display: flex;
    font-size: 17px;
    height: 100%;
    justify-content: center;
    pointer-events: none;
    position: absolute;
    right: 10px;
    top: 0;
    width: 22px;
    z-index: 1;
}

.field .datetime-control input[type="datetime-local"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    height: 100%;
    inset: 0;
    margin: 0;
    max-width: 100%;
    min-width: 0;
    opacity: 0;
    padding: 0 10px;
    position: absolute;
    width: 100%;
    z-index: 2;
}

.field .datetime-control input[type="datetime-local"]:focus {
    background: transparent;
    border: 0;
    box-shadow: none;
}

.datetime-control:focus-within {
    background: #fff;
    border-color: #5b9b83;
    box-shadow: 0 0 0 3px rgba(91, 155, 131, 0.12);
}

.datetime-control input::-webkit-datetime-edit {
    min-width: 0;
    overflow: hidden;
    padding: 0;
}

.datetime-control input::-webkit-calendar-picker-indicator {
    flex: 0 0 auto;
    height: 100%;
    margin: 0;
    width: 100%;
}

.select-wrap {
    position: relative;
}

.select-wrap::after {
    border-bottom: 2px solid #778681;
    border-right: 2px solid #778681;
    content: "";
    height: 7px;
    pointer-events: none;
    position: absolute;
    right: 12px;
    top: 14px;
    transform: rotate(45deg);
    width: 7px;
}

.select-wrap select {
    appearance: none;
    padding-right: 32px;
}

.input-with-suffix {
    position: relative;
}

.input-with-suffix input {
    padding-right: 48px;
}

.input-with-suffix b {
    color: #72817d;
    font-size: 10px;
    position: absolute;
    right: 13px;
    top: 14px;
}

.income-convert {
    background: #f7faf8;
    border: 1px solid #dce8e2;
    border-radius: 13px;
    overflow: hidden;
}

.income-convert[hidden],
.income-convert__fields[hidden] {
    display: none;
}

.income-convert__toggle {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 11px;
    padding: 12px 13px;
}

.income-convert__toggle input {
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.check-mark {
    align-items: center;
    background: #fff;
    border: 1px solid #b8c9c1;
    border-radius: 6px;
    color: transparent;
    display: flex;
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 900;
    height: 22px;
    justify-content: center;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
    width: 22px;
}

.income-convert__toggle input:checked + .check-mark {
    background: var(--forest);
    border-color: var(--forest);
    color: var(--lime);
}

.income-convert__toggle input:focus-visible + .check-mark {
    box-shadow: 0 0 0 3px rgba(91, 155, 131, 0.2);
}

.income-convert__toggle > span:last-child {
    display: grid;
    gap: 2px;
}

.income-convert__toggle strong {
    color: #36554c;
    font-size: 11px;
}

.income-convert__toggle small {
    color: #84938e;
    font-size: 9px;
}

.income-convert__fields {
    align-items: end;
    border-top: 1px solid #dce8e2;
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr 1fr;
    padding: 12px 13px;
}

.income-convert__result {
    background: var(--mint);
    border-radius: 10px;
    display: grid;
    gap: 3px;
    min-height: 42px;
    padding: 8px 12px;
}

.income-convert__result span {
    color: #648073;
    font-size: 8px;
}

.income-convert__result strong {
    color: #276b4d;
    font-size: 13px;
}

.submit-button {
    align-items: center;
    background: var(--forest);
    border: 0;
    border-radius: 11px;
    color: #fff;
    display: flex;
    font-size: 12px;
    font-weight: 800;
    gap: 8px;
    justify-content: center;
    margin-top: 2px;
    min-height: 43px;
    padding: 11px 18px;
    transition: background 160ms ease, transform 160ms ease;
}

.submit-button:hover,
.submit-button:focus-visible {
    background: #205046;
    outline: none;
    transform: translateY(-1px);
}

.submit-button > .ui-icon {
    color: var(--lime);
    font-size: 17px;
}

.submit-button--expense {
    background: #9f4545;
}

.submit-button--expense:hover,
.submit-button--expense:focus-visible {
    background: #8e3d3d;
}

.submit-button--expense > .ui-icon {
    color: #ffd9d4;
}

.submit-button:disabled {
    cursor: wait;
    opacity: 0.68;
}

.conversion-callout {
    align-items: center;
    background: #f0f7f4;
    border: 1px solid #d7e9e1;
    border-radius: 12px;
    display: flex;
    gap: 12px;
    padding: 11px 13px;
}

.conversion-callout > span {
    align-items: center;
    background: var(--mint);
    border-radius: 9px;
    color: #2f775b;
    display: flex;
    flex: 0 0 auto;
    font-size: 18px;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.conversion-callout p {
    color: #71807b;
    font-size: 10px;
    line-height: 1.45;
    margin: 0;
}

.conversion-callout strong {
    color: #345249;
    display: block;
    font-size: 11px;
    margin-bottom: 2px;
}

.conversion-preview {
    align-items: center;
    background: #fafcfb;
    border: 1px dashed #cbd9d3;
    border-radius: 12px;
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr auto 1fr;
    padding: 12px 15px;
}

.conversion-preview > div {
    display: grid;
    gap: 3px;
}

.conversion-preview > div:last-child {
    text-align: right;
}

.conversion-preview span {
    color: #8c9995;
    font-size: 9px;
}

.conversion-preview strong {
    color: #334b45;
    font-size: 13px;
}

.conversion-preview > div:last-child strong {
    color: #28754d;
}

.conversion-arrow {
    align-items: center;
    background: var(--mint);
    border-radius: 50%;
    color: #2f775b !important;
    display: flex;
    font-size: 15px !important;
    height: 27px;
    justify-content: center;
    width: 27px;
}

.side-stack {
    display: grid;
    gap: 18px;
}

.daily-panel,
.recent-panel {
    padding: 21px;
}

.date-chip {
    background: #f0f4f2;
    border-radius: 8px;
    color: #72817c;
    font-size: 8px;
    font-weight: 700;
    padding: 6px 8px;
}

.stat-list {
    display: grid;
    gap: 7px;
    margin-top: 18px;
}

.stat-item {
    align-items: center;
    background: #fafcfb;
    border: 1px solid #edf1ef;
    border-radius: 12px;
    display: flex;
    gap: 11px;
    padding: 10px;
}

.stat-icon {
    align-items: center;
    border-radius: 9px;
    display: flex;
    flex: 0 0 auto;
    font-size: 16px;
    font-weight: 800;
    height: 35px;
    justify-content: center;
    width: 35px;
}

.stat-icon--green {
    background: var(--mint);
    color: #2b7957;
}

.stat-icon--gold {
    background: var(--gold-soft);
    color: var(--gold);
}

.stat-icon--blue {
    background: var(--blue-soft);
    color: var(--blue);
}

.stat-item div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.stat-item span:not(.stat-icon) {
    color: #8b9894;
    font-size: 9px;
}

.stat-item strong {
    font-size: 12px;
}

.is-negative {
    color: var(--red);
}

.panel-heading--compact h2 {
    font-size: 15px;
}

.panel-heading--compact a {
    color: #418168;
    font-size: 9px;
    font-weight: 800;
}

.recent-list {
    display: grid;
    margin-top: 10px;
}

.recent-item {
    align-items: center;
    border-bottom: 1px solid #edf1ef;
    display: grid;
    gap: 9px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 9px 0;
}

.recent-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.recent-item > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.recent-item > div strong {
    font-size: 10px;
}

.recent-item > div span {
    color: #8a9793;
    font-size: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-item > b {
    font-size: 9px;
}

.movement-icon {
    align-items: center;
    border-radius: 9px;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 15px;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.movement-icon--income {
    background: var(--mint);
    color: #2b7957;
}

.movement-icon--expense {
    background: var(--red-soft);
    color: var(--red);
}

.movement-icon--conversion {
    background: var(--gold-soft);
    color: var(--gold);
}

.amount {
    white-space: nowrap;
}

.amount--income {
    color: #2f8661;
}

.amount--expense {
    color: var(--red);
}

.amount--conversion {
    color: var(--gold);
}

.mini-empty {
    align-items: center;
    color: #919e9a;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 0 7px;
    text-align: center;
}

.mini-empty span {
    align-items: center;
    background: #f0f4f2;
    border-radius: 50%;
    display: flex;
    font-size: 18px;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.mini-empty p {
    font-size: 10px;
    margin: 0;
}

.operation-edit {
    margin-top: 18px;
    padding: 22px;
    scroll-margin-top: 18px;
}

.operation-edit__heading {
    align-items: flex-start;
    display: flex;
    gap: 18px;
    justify-content: space-between;
}

.operation-edit__heading > div > p:last-child {
    color: #7c8b86;
    font-size: 9px;
    margin: 6px 0 0;
}

.operation-edit__heading > a {
    align-items: center;
    background: #f1f4f2;
    border-radius: 9px;
    color: #71807b;
    display: flex;
    flex: 0 0 auto;
    font-size: 18px;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.operation-edit__heading > a:hover,
.operation-edit__heading > a:focus-visible {
    background: var(--red-soft);
    color: var(--red);
    outline: none;
}

.operation-edit__form {
    background: #f8faf9;
    border: 1px solid #e2eae6;
    border-radius: 15px;
    margin-top: 17px;
    padding: 16px;
}

.operation-edit__grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.operation-edit__note {
    grid-column: span 2;
}

.operation-edit__actions {
    align-items: center;
    border-top: 1px solid #e1e8e5;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 15px;
    padding-top: 14px;
}

.operation-edit__actions > a {
    color: #788681;
    font-size: 10px;
    font-weight: 700;
}

.operation-edit__actions .submit-button {
    margin: 0;
    min-width: 190px;
}

.history-panel {
    margin-top: 18px;
    scroll-margin-top: 18px;
}

.history-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 20px 22px 16px;
}

.filters {
    align-items: end;
    background: #f8faf9;
    border: 1px solid #e4ebe7;
    border-radius: 14px;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(140px, 0.7fr) minmax(140px, 0.7fr) minmax(410px, 2fr) auto;
    padding: 11px;
    width: 100%;
}

.filter-control {
    display: grid;
    gap: 5px;
}

.filter-control > span,
.date-range legend {
    color: #7d8b87;
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.filters select {
    background-color: #fff;
    font-size: 10px;
    height: 39px;
    min-width: 125px;
    padding: 0 28px 0 10px;
}

.date-range {
    border: 0;
    display: grid;
    gap: 6px;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.date-range legend {
    margin-bottom: 5px;
    padding: 0;
}

.date-range__fields {
    align-items: center;
    display: grid;
    gap: 5px;
    grid-template-columns: minmax(125px, 1fr) auto minmax(125px, 1fr);
}

.date-range__arrow {
    color: #8da09a;
    font-size: 12px;
}

.filter-date {
    align-items: center;
    background: #fff;
    border: 1px solid #dce4e0;
    border-radius: 10px;
    display: flex;
    gap: 5px;
    height: 39px;
    padding: 0 7px 0 9px;
}

.filter-date > span {
    color: #8a9793;
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.filter-date input {
    background: transparent;
    border: 0;
    color: #53645f;
    font-size: 9px;
    height: 30px;
    min-width: 105px;
    outline: none;
    padding: 0;
}

.filter-date:focus-within {
    border-color: #5b9b83;
    box-shadow: 0 0 0 3px rgba(91, 155, 131, 0.12);
}

.date-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.date-presets button {
    background: #eef3f1;
    border: 0;
    border-radius: 7px;
    color: #6c7b76;
    cursor: pointer;
    font-size: 8px;
    font-weight: 750;
    min-height: 25px;
    padding: 4px 8px;
}

.date-presets button:hover,
.date-presets button:focus-visible,
.date-presets button.is-active {
    background: var(--mint);
    color: #2e7256;
    outline: none;
}

.filter-actions {
    align-items: stretch;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.filter-submit {
    background: var(--forest);
    border: 0;
    border-radius: 9px;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    height: 39px;
    padding: 0 16px;
    white-space: nowrap;
}

.filter-actions a {
    color: #778681;
    font-size: 9px;
    font-weight: 700;
    text-align: center;
}

.table-wrap {
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    width: 100%;
}

th,
td {
    border-top: 1px solid #edf1ef;
    padding: 13px 22px;
    text-align: left;
    vertical-align: middle;
}

th {
    background: #fafcfb;
    color: #8a9793;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

td {
    color: #60706b;
    font-size: 10px;
}

.align-right {
    text-align: right;
}

.type-cell {
    align-items: center;
    display: flex;
    gap: 10px;
}

.type-cell > span:last-child {
    display: grid;
    gap: 3px;
}

.type-cell strong {
    color: #273b36;
    font-size: 10px;
}

.type-cell small,
.rate-note {
    color: #96a29f;
    font-size: 8px;
}

.note-text {
    color: #53645f;
    display: block;
    max-width: 220px;
}

.rate-note {
    display: block;
    margin-top: 4px;
}

code {
    background: #f1f4f2;
    border-radius: 6px;
    color: #687771;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 8px;
    padding: 4px 6px;
}

.exchange-amount {
    display: grid;
    gap: 3px;
}

.exchange-amount span {
    color: var(--red);
    font-size: 9px;
}

.exchange-amount strong {
    color: #2f8661;
    font-size: 10px;
}

.delete-form {
    display: flex;
    justify-content: flex-end;
}

.delete-form button {
    align-items: center;
    background: #fff3f1;
    border: 1px solid #f0d1cd;
    border-radius: 8px;
    color: #a94a4a;
    display: flex;
    font-size: 16px;
    font-weight: 700;
    height: 29px;
    justify-content: center;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
    width: 29px;
}

.delete-form button:hover,
.delete-form button:focus-visible {
    background: #9f4545;
    border-color: #9f4545;
    color: #fff;
    outline: none;
}

.delete-form button:disabled {
    cursor: wait;
    opacity: 0.6;
}

.operation-actions {
    align-items: center;
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.operation-actions > a {
    align-items: center;
    background: #edf5f8;
    border: 1px solid #d2e3e9;
    border-radius: 8px;
    color: #39718b;
    display: flex;
    font-size: 13px;
    font-weight: 800;
    height: 29px;
    justify-content: center;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
    width: 29px;
}

.operation-actions > a:hover,
.operation-actions > a:focus-visible {
    background: #39718b;
    border-color: #39718b;
    color: #fff;
    outline: none;
}

.empty-state {
    align-items: center;
    color: #8d9a96;
    display: flex;
    flex-direction: column;
    padding: 30px;
    text-align: center;
}

.empty-state > span {
    align-items: center;
    background: #edf3f0;
    border-radius: 50%;
    color: #548373;
    display: flex;
    font-size: 22px;
    height: 48px;
    justify-content: center;
    margin-bottom: 10px;
    width: 48px;
}

.empty-state strong {
    color: #485c56;
    font-size: 12px;
}

.empty-state p {
    font-size: 9px;
    margin: 4px 0 0;
}

.currency-settings {
    margin-top: 18px;
    padding: 22px;
    scroll-margin-top: 18px;
}

.settings-heading {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
}

.settings-heading > div > p:last-child {
    color: #7c8b86;
    font-size: 10px;
    line-height: 1.5;
    margin: 6px 0 0;
}

.settings-count {
    background: #eff5f2;
    border-radius: 8px;
    color: #527468;
    font-size: 9px;
    font-weight: 800;
    padding: 7px 9px;
}

.currency-settings__body {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.78fr);
    margin-top: 18px;
}

.currency-catalog {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.currency-catalog__item {
    align-items: center;
    background: #fafcfb;
    border: 1px solid #e8eeeb;
    border-radius: 12px;
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 10px;
}

.currency-catalog__item > span:nth-child(2) {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.currency-catalog__item strong {
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.currency-catalog__item small {
    color: #899692;
    font-size: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.currency-catalog__item > b {
    color: #53665f;
    font-size: 9px;
}

.currency-form {
    background: #f7faf8;
    border: 1px solid #dfe9e4;
    border-radius: 15px;
    display: grid;
    gap: 13px;
    padding: 15px;
}

.currency-form__heading {
    align-items: center;
    display: flex;
    gap: 10px;
}

.currency-form__heading > span {
    align-items: center;
    background: var(--mint);
    border-radius: 9px;
    color: #2f775b;
    display: flex;
    flex: 0 0 auto;
    font-size: 18px;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.currency-form__heading div {
    display: grid;
    gap: 2px;
}

.currency-form__heading strong {
    font-size: 11px;
}

.currency-form__heading p {
    color: #84928e;
    font-size: 9px;
    margin: 0;
}

.currency-form__grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.user-settings {
    margin-top: 18px;
    padding: 22px;
    scroll-margin-top: 18px;
}

.user-settings__body {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.78fr);
    margin-top: 18px;
}

.user-list {
    display: grid;
    gap: 8px;
}

.user-list__item {
    align-items: center;
    background: #fafcfb;
    border: 1px solid #e8eeeb;
    border-radius: 12px;
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 11px;
}

.user-list__avatar {
    align-items: center;
    background: var(--mint);
    border-radius: 10px;
    color: #2d7358;
    display: flex;
    font-size: 10px;
    font-weight: 900;
    height: 38px;
    justify-content: center;
    letter-spacing: 0.03em;
    width: 38px;
}

.user-list__item > span:nth-child(2) {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.user-list__item strong {
    align-items: center;
    display: flex;
    font-size: 10px;
    gap: 6px;
}

.user-list__item strong em {
    background: #e8f4ed;
    border-radius: 5px;
    color: #35795d;
    font-size: 7px;
    font-style: normal;
    padding: 3px 5px;
}

.user-list__item small {
    color: #899692;
    font-size: 8px;
}

.user-list__item time {
    color: #97a29f;
    font-size: 8px;
    text-align: right;
}

.user-form {
    background: #f7faf8;
    border: 1px solid #dfe9e4;
    border-radius: 15px;
    display: grid;
    gap: 13px;
    padding: 15px;
}

.user-form__grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.logs-panel {
    margin-top: 18px;
    padding: 22px;
    scroll-margin-top: 18px;
}

[hidden] {
    display: none !important;
}

body.settings-open {
    overflow: hidden;
}

.settings-backdrop {
    background: rgba(11, 32, 28, 0.42);
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity 200ms ease;
    z-index: 100;
}

.settings-drawer {
    background: var(--canvas);
    box-shadow: -18px 0 50px rgba(11, 32, 28, 0.18);
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    height: 100dvh;
    max-width: 100%;
    position: fixed;
    right: 0;
    top: 0;
    transform: translateX(102%);
    transition: transform 220ms ease;
    width: min(720px, calc(100vw - 40px));
    z-index: 110;
}

body.settings-open .settings-backdrop {
    opacity: 1;
    pointer-events: auto;
}

body.settings-open .settings-drawer {
    transform: translateX(0);
}

.settings-drawer__header {
    align-items: flex-start;
    background: var(--forest-deep);
    color: #fff;
    display: flex;
    justify-content: space-between;
    padding: 20px 22px 17px;
}

.settings-drawer__header .eyebrow {
    color: #90aaa2;
}

.settings-drawer__header h2 {
    font-size: 22px;
    margin-top: 3px;
}

.settings-drawer__header p:last-child {
    color: #9db5ae;
    font-size: 9px;
    margin: 5px 0 0;
}

.settings-drawer__header > button {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 0;
    border-radius: 10px;
    color: #dbe8e4;
    display: flex;
    flex: 0 0 auto;
    font-size: 22px;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.settings-drawer__header > button:hover,
.settings-drawer__header > button:focus-visible {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    outline: none;
}

.settings-drawer__tabs {
    background: #fff;
    border-bottom: 1px solid #dfe7e3;
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 10px 14px;
}

.settings-drawer__tabs button {
    align-items: center;
    background: #f4f7f5;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #6d7c77;
    display: flex;
    font-size: 9px;
    font-weight: 800;
    gap: 6px;
    justify-content: center;
    min-height: 38px;
    padding: 7px 9px;
}

.settings-drawer__tabs button .ui-icon {
    font-size: 14px;
}

.settings-drawer__tabs button:hover,
.settings-drawer__tabs button:focus-visible,
.settings-drawer__tabs button.is-active {
    background: var(--mint);
    border-color: #cce9d9;
    color: #2e7256;
    outline: none;
}

.settings-drawer__body {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px;
}

.settings-drawer .currency-settings,
.settings-drawer .user-settings,
.settings-drawer .logs-panel {
    margin: 0;
}

.settings-drawer .currency-settings__body,
.settings-drawer .user-settings__body {
    grid-template-columns: 1fr;
}

.settings-drawer .log-list {
    max-height: none;
}

.log-list {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    max-height: 560px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-color: #bdcbc5 transparent;
    scrollbar-width: thin;
}

.log-item {
    align-items: center;
    background: #fafcfb;
    border: 1px solid #e7eeea;
    border-radius: 13px;
    display: grid;
    gap: 12px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 12px 13px;
}

.log-item--deleted {
    background: #fff9f8;
    border-color: #f0dcda;
}

.log-item--updated {
    background: #f8fbfd;
    border-color: #dce9ee;
}

.log-item__icon {
    align-items: center;
    background: var(--mint);
    border-radius: 10px;
    color: #2c7757;
    display: flex;
    flex: 0 0 auto;
    font-size: 17px;
    font-weight: 800;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.log-item--deleted .log-item__icon {
    background: var(--red-soft);
    color: var(--red);
    font-size: 20px;
}

.log-item--updated .log-item__icon {
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 15px;
}

.log-item__content {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.log-item__title {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.log-item__title strong {
    color: #2b403a;
    font-size: 11px;
}

.log-item--deleted .log-item__title strong {
    color: #8c4141;
}

.log-item--updated .log-item__title strong {
    color: #366b84;
}

.log-item__meta {
    align-items: center;
    color: #8a9793;
    display: flex;
    flex-wrap: wrap;
    font-size: 8px;
    gap: 7px 13px;
}

.log-item__meta > span:first-child {
    color: #687b75;
    font-weight: 700;
}

.log-item__meta i {
    color: #4e8b72;
    display: inline-flex;
    font-size: 11px;
    font-style: normal;
    margin-right: 2px;
    vertical-align: -2px;
}

.log-item__note {
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.log-item__amount {
    display: grid;
    gap: 3px;
    min-width: 130px;
    text-align: right;
}

.log-item__amount span {
    color: var(--red);
    font-size: 8px;
}

.log-item__amount b {
    color: #2f8060;
    font-size: 10px;
    white-space: nowrap;
}

.log-item--deleted .log-item__amount b {
    color: #9d5050;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.logs-empty {
    align-items: center;
    color: #8b9994;
    display: flex;
    flex-direction: column;
    padding: 32px 20px 16px;
    text-align: center;
}

.logs-empty > span {
    align-items: center;
    background: #edf3f0;
    border-radius: 50%;
    color: #548373;
    display: flex;
    font-size: 22px;
    height: 48px;
    justify-content: center;
    margin-bottom: 10px;
    width: 48px;
}

.logs-empty strong {
    color: #485c56;
    font-size: 12px;
}

.logs-empty p {
    font-size: 9px;
    margin: 4px 0 0;
}

.auth-page {
    background: var(--forest-deep);
    min-height: 100vh;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(360px, 0.95fr) minmax(480px, 1.05fr);
    min-height: 100vh;
}

.auth-visual {
    background:
        radial-gradient(circle at 80% 20%, rgba(200, 241, 109, 0.13), transparent 28%),
        radial-gradient(circle at 20% 80%, rgba(77, 139, 118, 0.22), transparent 34%),
        var(--forest-deep);
    color: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 46px clamp(36px, 6vw, 86px);
    position: relative;
}

.auth-visual::after {
    border: 1px solid rgba(200, 241, 109, 0.11);
    border-radius: 50%;
    content: "";
    height: 420px;
    position: absolute;
    right: -260px;
    top: 24%;
    width: 420px;
}

.auth-brand {
    margin: 0;
    position: relative;
    z-index: 1;
}

.auth-message {
    margin: auto 0;
    max-width: 560px;
    position: relative;
    z-index: 1;
}

.auth-message .eyebrow {
    color: var(--lime);
}

.auth-message h1 {
    font-size: clamp(38px, 5vw, 66px);
    line-height: 1.03;
    margin: 0 0 22px;
}

.auth-message > p:last-child {
    color: #acc3bd;
    font-size: 14px;
    line-height: 1.7;
    max-width: 420px;
}

.auth-security {
    align-items: center;
    display: flex;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.auth-security > span {
    align-items: center;
    background: rgba(200, 241, 109, 0.12);
    border-radius: 50%;
    color: var(--lime);
    display: flex;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.auth-security p {
    color: #94ada6;
    font-size: 9px;
    margin: 0;
}

.auth-security strong {
    color: #d8e6e2;
    display: block;
    font-size: 10px;
    margin-bottom: 2px;
}

.auth-form-side {
    align-items: center;
    background: #f3f6f3;
    display: flex;
    justify-content: center;
    padding: 38px;
}

.auth-card {
    max-width: 430px;
    width: 100%;
}

.auth-card__heading {
    margin-bottom: 22px;
}

.auth-lock {
    align-items: center;
    background: var(--mint);
    border-radius: 12px;
    color: #2c7357;
    display: flex;
    font-size: 17px;
    font-weight: 800;
    height: 44px;
    justify-content: center;
    margin-bottom: 20px;
    width: 44px;
}

.auth-card__heading h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 32px;
    letter-spacing: -0.035em;
    margin-bottom: 8px;
}

.auth-card__heading > p:last-child {
    color: #75847f;
    font-size: 11px;
    line-height: 1.55;
    margin: 0;
}

.auth-form {
    display: grid;
    gap: 13px;
}

.auth-submit {
    margin-top: 5px;
}

.auth-footnote {
    color: #929e9a;
    font-size: 9px;
    line-height: 1.5;
    margin: 14px 0 0;
    text-align: center;
}

.footer {
    align-items: center;
    color: #96a19e;
    display: flex;
    font-size: 8px;
    justify-content: space-between;
    padding: 18px 4px 0;
}

.footer p {
    margin: 0;
}

@media (max-width: 1180px) {
    .filters {
        align-items: stretch;
        grid-template-columns: 1fr 1fr;
    }

    .date-range,
    .filter-actions {
        grid-column: span 2;
    }

    .filter-actions {
        align-items: center;
        flex-direction: row;
        justify-content: flex-end;
    }

    .balance-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .balance-card--primary {
        grid-column: span 1;
    }

    .workspace-grid {
        grid-template-columns: 1fr;
    }

    .currency-settings__body {
        grid-template-columns: 1fr;
    }

    .user-settings__body {
        grid-template-columns: 1fr;
    }

    .side-stack {
        grid-template-columns: 0.75fr 1.25fr;
    }
}

@media (max-width: 850px) {
    html {
        scroll-padding-top: 76px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-visual {
        min-height: 260px;
        padding: 28px;
    }

    .auth-message {
        margin: 38px 0 22px;
    }

    .auth-message h1 {
        font-size: 38px;
        margin-bottom: 12px;
    }

    .auth-message > p:last-child,
    .auth-security {
        display: none;
    }

    .sidebar {
        align-items: center;
        flex-direction: row;
        height: 66px;
        justify-content: space-between;
        padding: 8px 12px;
        position: sticky;
        width: 100%;
    }

    .brand {
        margin: 0;
    }

    .brand-mark {
        border-radius: 9px;
        font-size: 20px;
        height: 36px;
        width: 36px;
    }

    .brand small,
    .sidebar-note {
        display: none;
    }

    .main-nav {
        display: none;
    }

    .mobile-top-actions {
        align-items: center;
        display: flex;
        flex: 0 0 auto;
        gap: 5px;
    }

    .mobile-top-actions form {
        display: flex;
        margin: 0;
    }

    .mobile-top-actions a,
    .mobile-top-actions button,
    .mobile-user-avatar {
        align-items: center;
        background: rgba(255, 255, 255, 0.08);
        border: 0;
        border-radius: 9px;
        color: #dce9e5;
        display: flex;
        flex: 0 0 40px;
        font-size: 16px;
        height: 40px;
        justify-content: center;
        padding: 0;
        width: 40px;
    }

    .mobile-top-actions a {
        background: var(--lime);
        color: var(--forest-deep);
    }

    .mobile-user-avatar {
        color: var(--lime);
        font-size: 10px;
        font-weight: 900;
        letter-spacing: 0.04em;
    }

    .mobile-top-actions button {
        cursor: pointer;
    }

    .mobile-top-actions svg {
        display: block;
        fill: none;
        height: 19px;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-width: 1.9;
        width: 19px;
    }

    .page-header {
        display: none;
    }

    .content {
        margin-left: 0;
        padding: 14px 14px 18px;
    }

    .flash {
        margin-bottom: 12px;
        padding: 10px 12px;
    }

    .app-toast {
        margin: 0;
        max-width: none;
        right: 12px;
        top: 72px;
        width: calc(100vw - 24px);
    }

    .balance-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .balance-card--primary {
        grid-column: span 2;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-toast,
    .app-toast::after {
        animation: none;
    }

    .app-toast.is-hiding {
        opacity: 0;
    }
}

@media (max-width: 620px) {
    .settings-drawer {
        width: 100%;
    }

    .settings-drawer__header {
        padding: 16px;
    }

    .settings-drawer__tabs {
        gap: 4px;
        padding: 8px;
    }

    .settings-drawer__tabs button {
        flex-direction: column;
        font-size: 7px;
        gap: 2px;
        min-height: 45px;
        padding: 5px 3px;
    }

    .settings-drawer__body {
        padding: 8px;
    }

    .settings-drawer .currency-settings,
    .settings-drawer .user-settings,
    .settings-drawer .logs-panel {
        border-radius: 14px;
        padding: 15px;
    }

    .page-header {
        align-items: flex-start;
    }

    .primary-shortcut {
        font-size: 0;
        padding: 10px;
    }

    .primary-shortcut .ui-icon {
        font-size: 20px;
    }

    .header-copy {
        max-width: 270px;
    }

    .header-actions {
        align-items: flex-end;
        flex-direction: column-reverse;
    }

    .user-chip > span:nth-child(2) {
        display: none;
    }

    .user-chip {
        min-height: 38px;
        padding: 3px;
    }

    .user-avatar,
    .user-chip button {
        height: 30px;
        width: 30px;
    }

    .balance-grid {
        gap: 10px;
    }

    .balance-card {
        padding: 14px;
    }

    .balance-card__body strong {
        font-size: 20px;
    }

    .balance-card__footer span:first-child {
        display: none;
    }

    .balance-card--primary {
        padding: 16px;
    }

    .balance-card--primary .balance-card__body {
        margin: 15px 0 12px;
    }

    .balance-card--primary .balance-card__body strong {
        font-size: 24px;
    }

    .balance-card__portfolio {
        align-items: stretch;
        border-radius: 11px;
        gap: 9px;
        padding: 9px;
    }

    .balance-card__portfolio-content {
        gap: 8px;
    }

    .balance-card__portfolio-total {
        justify-content: space-between;
    }

    .balance-card__portfolio-total small {
        font-size: 9px;
    }

    .balance-card__portfolio-total b {
        font-size: 13px;
    }

    .balance-card__portfolio-breakdown {
        padding-top: 8px;
    }

    .balance-card__portfolio-breakdown-heading {
        margin-bottom: 7px;
    }

    .balance-card__portfolio-breakdown-heading > span {
        font-size: 8px;
        letter-spacing: 0.08em;
    }

    .balance-card__portfolio-breakdown-heading small {
        font-size: 7px;
    }

    .balance-card__portfolio-breakdown ul {
        gap: 5px;
        max-height: 156px;
        padding-right: 3px;
    }

    .balance-card__portfolio-breakdown li {
        border-radius: 8px;
        gap: 2px 7px;
        padding: 7px 8px;
    }

    .valuation-currency {
        font-size: 10px;
    }

    .valuation-formula {
        font-size: 8px;
    }

    .balance-card__portfolio-breakdown li > b {
        font-size: 9px;
    }

    .balance-card__portfolio-breakdown li > small,
    .balance-card__portfolio-breakdown > p {
        font-size: 7px;
    }

    .balance-card__portfolio a {
        align-self: flex-start;
        border-radius: 9px;
        flex-basis: 34px;
        font-size: 18px;
        height: 34px;
    }

    .transaction-panel,
    .daily-panel,
    .recent-panel {
        padding: 17px;
    }

    .secure-label {
        display: none;
    }

    .action-tabs button .ui-icon {
        font-size: 18px;
    }

    .flow-switch button .ui-icon {
        height: 24px;
        width: 24px;
    }

    .submit-button > .ui-icon {
        font-size: 18px;
    }

    .conversion-callout .ui-icon,
    .currency-form__heading .ui-icon {
        font-size: 18px;
    }

    .conversion-arrow .ui-icon {
        font-size: 16px;
    }

    .stat-icon .ui-icon,
    .movement-icon .ui-icon {
        font-size: 17px;
    }

    .settings-drawer__tabs button .ui-icon {
        font-size: 18px;
    }

    .settings-drawer__header > button .ui-icon,
    .operation-edit__heading > a .ui-icon {
        font-size: 19px;
    }

    .log-item__icon .ui-icon {
        font-size: 18px;
    }

    .logs-empty > span .ui-icon,
    .empty-state > span .ui-icon,
    .mini-empty > span .ui-icon {
        font-size: 21px;
    }

    .field-row,
    .field-row--three,
    .income-convert__fields,
    .currency-form__grid,
    .user-form__grid,
    .operation-edit__grid,
    .side-stack {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .operation-edit {
        padding: 17px;
    }

    .operation-edit__form {
        padding: 13px;
    }

    .operation-edit__note {
        grid-column: span 1;
    }

    .operation-edit__actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .operation-edit__actions > a {
        padding: 8px;
        text-align: center;
    }

    .operation-edit__actions .submit-button {
        min-width: 0;
        width: 100%;
    }

    .currency-catalog {
        grid-template-columns: 1fr;
    }

    .settings-heading {
        gap: 12px;
    }

    .currency-settings {
        padding: 17px;
    }

    .user-settings {
        padding: 17px;
    }

    .logs-panel {
        padding: 17px;
    }

    .user-list__item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .user-list__item time {
        grid-column: 2;
        text-align: left;
    }

    .log-list {
        max-height: 620px;
        padding-right: 0;
    }

    .log-item {
        align-items: start;
        gap: 9px;
        grid-template-columns: auto minmax(0, 1fr);
        padding: 11px;
    }

    .log-item__amount {
        grid-column: 2;
        min-width: 0;
        text-align: left;
    }

    .log-item__meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .log-item__note {
        max-width: 100%;
    }

    .auth-form-side {
        padding: 30px 20px 42px;
    }

    .auth-visual {
        min-height: 220px;
        padding: 22px;
    }

    .auth-message {
        margin: 28px 0 0;
    }

    .auth-message h1 {
        font-size: 32px;
    }

    .conversion-preview {
        grid-template-columns: 1fr;
    }

    .conversion-preview > div,
    .conversion-preview > div:last-child {
        text-align: center;
    }

    .conversion-arrow {
        justify-self: center;
        transform: rotate(90deg);
    }

    .history-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        padding: 15px 12px 12px;
    }

    .filters {
        align-items: stretch;
        gap: 8px;
        grid-template-columns: 1fr 1fr;
        padding: 8px;
        width: 100%;
    }

    .filters .filter-control,
    .filters select {
        width: 100%;
    }

    .filters select,
    .filter-date {
        min-width: 0;
    }

    .date-range,
    .filter-actions {
        grid-column: span 2;
    }

    .filter-date input {
        flex: 1;
        min-width: 0;
    }

    .filter-actions {
        align-items: center;
        flex-direction: row;
    }

    .filter-submit {
        flex: 1;
    }

    .date-presets button {
        flex: 1;
    }

    .date-range__fields {
        align-items: stretch;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .date-range__arrow {
        display: none;
    }

    .filter-date {
        align-items: stretch;
        display: grid;
        gap: 2px;
        height: auto;
        padding: 6px 8px;
    }

    .filter-date input {
        font-size: 10px;
        height: 25px;
        max-width: 100%;
        padding: 0;
    }

    .field input[type="date"],
    .field input[type="datetime-local"] {
        font-size: 16px;
        max-width: 100%;
        overflow: hidden;
        padding-left: 10px;
        padding-right: 6px;
    }

    .datetime-control {
        contain: inline-size;
        max-width: 100%;
        width: 100%;
    }

    .field .datetime-control input[type="datetime-local"] {
        inline-size: 100%;
        max-inline-size: 100%;
        min-inline-size: 0;
        width: -webkit-fill-available;
    }

    .operations-table,
    .operations-table tbody,
    .operations-table tr,
    .operations-table td {
        display: block;
        width: 100%;
    }

    .operations-table thead {
        display: none;
    }

    .operations-table tbody {
        display: grid;
        gap: 9px;
        padding: 0 10px 11px;
    }

    .operations-table tr {
        background: #fff;
        border: 1px solid #e5ece8;
        border-radius: 12px;
        display: grid;
        gap: 7px 9px;
        grid-template-columns: minmax(0, 1fr) auto auto;
        padding: 11px;
    }

    .operations-table td {
        align-items: center;
        border: 0;
        display: flex;
        min-width: 0;
        padding: 0;
        text-align: left;
    }

    .operations-table td::before {
        display: none;
    }

    .operations-table td:nth-child(1) {
        grid-column: 1 / 3;
        grid-row: 1;
    }

    .operations-table td:nth-child(2) {
        border-top: 1px solid #edf2ef;
        grid-column: 1 / -1;
        grid-row: 2;
        padding-top: 7px;
    }

    .operations-table td:nth-child(3) {
        color: #778681;
        font-size: 8px;
        grid-column: 1;
        grid-row: 3;
    }

    .operations-table td:nth-child(4) {
        grid-column: 2;
        grid-row: 3;
    }

    .operations-table td:nth-child(4) code {
        display: block;
        font-size: 7px;
        max-width: 98px;
        overflow: hidden;
        padding: 3px 5px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .operations-table td:nth-child(5) {
        align-items: flex-end;
        grid-column: 3;
        grid-row: 1;
        justify-content: flex-end;
        text-align: right;
    }

    .operations-table td:nth-child(6) {
        grid-column: 3;
        grid-row: 3;
        justify-content: flex-end;
    }

    .operations-table td[colspan] {
        grid-column: 1 / -1;
    }

    .operations-table .type-cell {
        gap: 8px;
    }

    .operations-table .movement-icon {
        height: 29px;
        width: 29px;
    }

    .operations-table .note-text {
        font-size: 9px;
        max-width: none;
    }

    .operations-table .rate-note {
        font-size: 7px;
        margin-top: 2px;
    }

    .operations-table .amount,
    .operations-table .exchange-amount strong {
        font-size: 10px;
    }

    .operations-table .exchange-amount span {
        font-size: 8px;
    }

    .operations-table .operation-actions > a,
    .operations-table .delete-form button {
        height: 34px;
        width: 34px;
    }

    .operations-table .operation-actions .ui-icon {
        font-size: 15px;
    }

    .note-text {
        max-width: 220px;
    }

    .footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 370px) {
    .sidebar .brand > span:last-child {
        display: none;
    }

    .sidebar .brand {
        gap: 0;
    }

    .mobile-top-actions a,
    .mobile-top-actions button,
    .mobile-user-avatar {
        flex-basis: 39px;
        height: 39px;
        width: 39px;
    }

    .operations-table td:nth-child(4) code {
        max-width: 82px;
    }
}
