
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background: #f1f5f9;
  color: #1e293b;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
}

header {
  text-align: center;
  margin-bottom: 28px;
}

header h1 {
  color: #2563eb;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.card, .panel {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px #0000000d;
}

.card h2 {
  font-size: 14px;
  color: #64748b;
}

.card p {
  font-size: 24px;
  font-weight: bold;
}

.panel {
  margin-bottom: 24px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

label {
  font-weight: 600;
}

input, select {
  width: 100%;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 16px;
}

button {
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  font-size: 16px;
}

button:hover {
  background: #1d4ed8;
}

#transaction-list {
  list-style: none;
  padding: 0;
}

.transaction {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e2e8f0;
  padding: 14px 0;
}

.transaction-info {
  min-width: 0;
  overflow-wrap: anywhere;
}

.transaction-info small {
  display: block;
  color: #64748b;
  margin-top: 4px;
}

.transaction-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.income {
  color: #059669;
}

.expense {
  color: #dc2626;
}

.delete-btn {
  background: #fee2e2;
  color: #991b1b;
  padding: 7px 10px;
}

.delete-btn:hover {
  background: #fecaca;
}

@media (max-width: 600px) {
  .summary {
    grid-template-columns: 1fr;
  }

  .transaction {
    align-items: flex-start;
    flex-direction: column;
  }

  .transaction-right {
    width: 100%;
    justify-content: space-between;
  }
}
[hidden] {
    display: none !important;
}

.auth-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.auth-toolbar button {
    width: auto;
    padding: 10px 18px;
    background-color: #64748b;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.auth-toolbar button:hover {
    background-color: #475569;
}

/* hidden属性を確実に反映 */
[hidden] {
    display: none !important;
}
