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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--tg-theme-bg-color, #ffffff);
    color: var(--tg-theme-text-color, #000000);
    padding: 16px;
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 0 auto;
}

header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--tg-theme-hint-color, #999999);
}

h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--tg-theme-text-color, #000000);
}

h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--tg-theme-text-color, #000000);
}

.client-info {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #999999);
}

.balance-section {
    margin-bottom: 32px;
}

.balance-card {
    background: var(--tg-theme-secondary-bg-color, #f0f0f0);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.balance-amount {
    font-size: 36px;
    font-weight: 700;
    color: var(--tg-theme-button-color, #3390ec);
    margin-top: 12px;
}

.balance-amount::after {
    content: " ч";
    font-size: 24px;
    font-weight: 400;
}

.history-section {
    margin-top: 32px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    background: var(--tg-theme-secondary-bg-color, #f0f0f0);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.history-item-left {
    flex: 1;
}

.history-item-type {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.history-item-note {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #999999);
    margin-top: 4px;
}

.history-item-date {
    font-size: 12px;
    color: var(--tg-theme-hint-color, #999999);
}

.history-item-amount {
    font-size: 20px;
    font-weight: 600;
    text-align: right;
}

.history-item-amount.positive {
    color: #4caf50;
}

.history-item-amount.negative {
    color: #f44336;
}

.history-item-amount.undo {
    color: #ff9800;
}

.loading {
    text-align: center;
    color: var(--tg-theme-hint-color, #999999);
    padding: 20px;
}

.type-icon {
    display: inline-block;
    margin-right: 8px;
    font-size: 18px;
}

.type-topup {
    color: #4caf50;
}

.type-worklog {
    color: #f44336;
}

.type-undo {
    color: #ff9800;
}

.type-adjust {
    color: #2196f3;
}

