* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #1a1a1a;
  color: #fff;
  display: flex;
  justify-content: center;
  padding: 16px;
  min-height: 100vh;
}
.app {
  max-width: 420px;
  width: 100%;
}
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.logo {
  font-weight: 700;
  font-size: 22px;
  color: #FFDD2D;
  cursor: pointer;
}
.name-input {
  background: transparent;
  border: 1px solid #444;
  color: #ccc;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 16px;
  width: 160px;
}
.balance-card {
  background: linear-gradient(135deg, #222, #2a2a2a);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #FFDD2D33;
}
.balance-label {
  font-size: 14px;
  color: #aaa;
  margin-bottom: 6px;
}
.balance-amount {
  font-size: 36px;
  font-weight: 700;
  color: #FFDD2D;
  margin-bottom: 16px;
}
.balance-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sum-input {
  background: #333;
  border: none;
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  flex: 1;
  min-width: 80px;
}
.btn {
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  background: #333;
  color: #FFDD2D;
}
.add-btn { background: #4caf50; color: #000; }
.deduct-btn { background: #ff5252; color: #000; }
.income-btn { background: #4caf50; color: #fff; }
.expense-btn { background: #ff5252; color: #fff; }

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.tab {
  background: #333;
  color: #aaa;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}
.tab.active { background: #FFDD2D; color: #000; }
.content {
  background: #222;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
  min-height: 200px;
}
.tx-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #333;
}
.tx-desc { font-weight: 600; }
.tx-date { font-size: 12px; color: #999; }
.tx-amount { font-weight: 700; font-size: 18px; }
.positive { color: #4caf50; }
.negative { color: #ff5252; }
.add-operation {
  background: #222;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.desc-input { flex: 2; min-width: 120px; background: #333; border:none; padding:10px; border-radius:10px; color:#fff; }
.add-operation .sum-input { flex: 1; }
.empty-message { text-align:center; color:#777; padding: 40px 0; }