* { box-sizing: border-box; font-family: -apple-system, Segoe UI, Roboto, sans-serif; }
body { margin: 0; background: #f4f6f5; color: #1c2a22; }

.auth-box {
  max-width: 380px; margin: 10vh auto; background: white;
  padding: 32px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.auth-box h1 { font-size: 22px; margin-bottom: 4px; color: #2e5e3e; }
.subtitle { color: #667; font-size: 13px; margin-bottom: 24px; }

label { display: block; margin: 12px 0 4px; font-size: 13px; font-weight: 600; }
input, select, textarea { width: 100%; padding: 10px; border: 1px solid #ccd6d0; border-radius: 6px; font-size: 14px; font-family: inherit; }
button { margin-top: 18px; padding: 10px 16px; background: #2e5e3e; color: white; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; }
button:hover { background: #244b32; }
.btn-small { padding: 6px 10px; font-size: 12px; margin-right: 4px; margin-top: 0; }
.btn-danger { background: #a33b3b; }
.btn-danger:hover { background: #822c2c; }
.btn-secondary { background: #6b7770; }
.btn-secondary:hover { background: #545f59; }

.checkbox-label { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-top: 14px; }
.checkbox-label input { width: auto; }

.error { color: #a33b3b; font-size: 13px; margin-top: 10px; }
.success { color: #2e5e3e; font-size: 13px; margin-top: 10px; }

.topnav {
  display: flex; align-items: center; justify-content: space-between;
  background: #1e3626; color: white; padding: 14px 24px; flex-wrap: wrap; gap: 8px;
}
.brand { font-weight: 700; }
.nav-links a { color: #d7e6dc; margin-left: 18px; text-decoration: none; font-size: 14px; }
.nav-links a:hover { text-decoration: underline; }

.container { max-width: 1050px; margin: 32px auto; padding: 0 16px; }
.hint { background: #eef4f0; border-left: 4px solid #2e5e3e; padding: 12px 16px; font-size: 13px; border-radius: 6px; }

.cards { display: flex; gap: 16px; margin: 20px 0; flex-wrap: wrap; }
.card { background: white; padding: 20px; border-radius: 10px; flex: 1; min-width: 140px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border-top: 4px solid #ccd6d0; }
.card-value { display: block; font-size: 28px; font-weight: 700; color: #2e5e3e; }
.card-label { font-size: 12px; color: #667; }
.card-active { border-top-color: #2e5e3e; }
.card-sold { border-top-color: #c98a1f; }
.card-dead { border-top-color: #a33b3b; }
.card-transferred { border-top-color: #2f5fa3; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; background: white; padding: 20px; border-radius: 10px; margin-bottom: 32px; }
.form-grid button { grid-column: span 2; }
#form-msg, #create-msg { grid-column: span 2; }

table { width: 100%; border-collapse: collapse; background: white; border-radius: 8px; overflow: hidden; margin-bottom: 24px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; font-size: 13px; }
th { background: #eef4f0; }
.row-deleted { opacity: 0.55; background: #fbf4f4; }

.badge { padding: 3px 8px; border-radius: 12px; font-size: 11px; text-transform: uppercase; }
.badge-active { background: #dcf0e1; color: #21603a; }
.badge-sold { background: #fdeccb; color: #8a5b12; }
.badge-dead { background: #f5d5d5; color: #8a2020; }
.badge-transferred { background: #d9e6f5; color: #1f4c8a; }
.reason-note { font-size: 11px; color: #667; margin-top: 3px; }

.filter-row { display: flex; gap: 8px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.filter-row input, .filter-row select { flex: 1; min-width: 160px; }
.filter-row button { margin-top: 0; }

.result-box { background: white; padding: 16px; border-radius: 8px; margin-top: 16px; font-size: 14px; }

.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.modal-box {
  background: white; padding: 24px; border-radius: 10px; width: 90%; max-width: 420px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.modal-box h3 { margin-top: 0; }
.modal-actions { display: flex; gap: 8px; margin-top: 20px; }
.modal-actions button { flex: 1; margin-top: 0; }

canvas { background: white; border-radius: 10px; padding: 16px; margin-bottom: 24px; }
