
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f0f2f5;
  margin: 0;
  padding: 40px 20px;
  display: flex;
  justify-content: center;
}

form {
  background: #ffffff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  max-width: 700px;
  width: 100%;
  box-sizing: border-box;
}

h2 {
  text-align: center;
  color: #333;
}

fieldset {
  border: none;
  margin-bottom: 20px;
  padding: 0;
}

label {
  display: block;
  margin: 10px 0 5px;
  font-weight: 500;
  color: #333;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 8px;
  margin-top: 2px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

button {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  font-size: 16px;
  background-color: #0077cc;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button:hover {
  background-color: #005fa3;
}

.child-section {
  border: 1px solid #e0e0e0;
  padding: 15px;
  margin-top: 15px;
  background: #f9f9f9;
  border-radius: 5px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 25px;
  background: white;
}

th, td {
  padding: 12px 10px;
  border-bottom: 1px solid #ddd;
  text-align: left;
  vertical-align: middle;
}

th {
  background-color: #f2f2f2;
  font-weight: bold;
}

tr:hover {
  background-color: #f9f9f9;
}

td form {
  margin: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.actions input[type="password"] {
  max-width: 120px;
}

.actions button {
  padding: 6px 10px;
  font-size: 14px;
}

.user-management {
  margin: 0 auto;
  max-width: 800px;
  padding: 20px;
}

.user-form {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 30px;
}

.user-form .form-group {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
}

.user-form button {
  align-self: flex-start;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.actions input[type="password"] {
  max-width: 140px;
}

.family-card {
  width: 100%;
  background: #fff;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.family-header h3 {
  margin-top: 0;
}

.badge {
  background: #0077cc;
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.8em;
  margin-left: 8px;
}

.children-section {
  margin-top: 15px;
}

.child-card {
  border-left: 3px solid #0077cc;
  padding: 12px 15px;
  margin-top: 10px;
  background: #f9f9f9;
  border-radius: 5px;
}

.child-card h4 {
  margin-top: 0;
  font-size: 1.1em;
  color: #333;
}

.child-card select,
.child-card textarea {
  width: 100%;
  margin-top: 6px;
  margin-bottom: 10px;
  padding: 6px;
  font-size: 14px;
}

.actions-footer {
  margin-top: 30px;
  text-align: center;
}

.actions-footer .btn {
  text-decoration: none;
  background: #0077cc;
  color: white;
  padding: 10px 16px;
  border-radius: 4px;
  margin: 0 8px;
  display: inline-block;
}

.actions-footer .btn:hover {
  background: #005fa3;
}

.family-card.completed {
  border-left: 5px solid #28a745;
  background-color: #f0fff4;
}

.family-card .badge {
  background-color: #555;
}

.btn {
  display: inline-block;
  background-color: #0077cc;
  color: white;
  padding: 6px 12px;
  text-decoration: none;
  border-radius: 4px;
  margin-top: 6px;
  font-size: 0.9em;
}
.btn:hover {
  background-color: #005fa3;
}

/* Responsive layout for mobile */
@media (max-width: 428px) {
  body, html {
    padding: 10px;
    font-size: 16px;
  }

  .container {
    padding: 10px;
  }

  .family-card {
    width: 100%;
    margin-bottom: 15px;
  }

  .header,
 
  .child-card,
  fieldset {
    width: 100%;
    margin: 10px 0;
    padding: 12px;
    box-sizing: border-box;
  }

  fieldset {
    border: 1px solid #ccc;
    padding: 12px;
    margin-bottom: 20px;
  }

  .family-header h3,
  .child-card h4 {
    font-size: 1.1em;
  }

  select,
  input,
  textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
  }

  label {
    display: block;
    margin-bottom: 8px;
  }

  textarea {
    resize: vertical;
  }

  .actions-footer {
    text-align: center;
  }

  .actions-footer .btn {
    display: block;
    margin: 10px auto;
  }

  table {
    width: 100%;
    font-size: 14px;
    border-collapse: collapse;
  }

  table th,
  table td {
    padding: 6px;
    text-align: left;
  }

  form {
    width: 100%;
    max-width: 100%;
  }
}

.child-entry {
  background: #eee;
  padding: 10px;
  margin: 10px 0;
  border-left: 3px solid #ccc;
}

.child-entry.fulfilled {
  background: #d4edda;
  border-left-color: #28a745;
}
.toggle-needs {
  cursor: pointer;
  font-weight: bold;
  color: #007BFF;
  margin-bottom: 5px;
  display: inline-block;
}
.toggle-needs:hover {
  text-decoration: underline;
}

.child-entry.pending {
  background-color: #fff9c4;
  border-left-color: #fbc02d;
}


.qr-code {
  float: right;
  margin-top: -100px;
  margin-right: 10px;
}

.family-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 1em;
}

.family-header h2 {
  margin: 0;
  font-size: 1.5em;
}

.qr-img {
  height: 120px;
}

@media (max-width: 600px) {
  .family-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}