* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, sans-serif; background: #f5f5f3; color: #1c2b3a; padding: 1rem; }
.page { max-width: 800px; margin: 0 auto; }
header { padding: 1rem 0 1.5rem; }
h1 { font-size: 1.4rem; font-weight: 600; }
.subtitle { color: #666; font-size: 0.9rem; margin-top: 0.25rem; }
.patient-block { background: white; border-radius: 10px; padding: 1rem; margin-bottom: 1rem; border: 1px solid #ddd; }
.block-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.block-num { font-weight: 600; }
.remove-btn { background: none; border: none; color: #a32d2d; cursor: pointer; font-size: 0.85rem; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.full { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; font-size: 0.85rem; color: #555; gap: 0.25rem; }
input, select, textarea { padding: 0.5rem; border: 1px solid #ccc; border-radius: 6px; font-size: 0.95rem; width: 100%; }
.implant-fields { display: contents; }
.implant-fields.hidden { display: none; }
.actions { display: flex; gap: 1rem; margin: 1rem 0; flex-wrap: wrap; }
#add-btn { background: white; border: 1px solid #1a6b5a; color: #1a6b5a; padding: 0.6rem 1.2rem; border-radius: 8px; cursor: pointer; font-size: 0.95rem; }
#submit-btn { background: #1a6b5a; color: white; border: none; padding: 0.6rem 1.4rem; border-radius: 8px; cursor: pointer; font-size: 0.95rem; }
#submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.hidden { display: none !important; }
#success { background: #eaf3de; border-radius: 10px; padding: 1.5rem; margin-top: 1rem; }
#success h2 { color: #27500a; margin-bottom: 0.5rem; }
@media (max-width: 500px) { .grid { grid-template-columns: 1fr; } }