@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');

:root {
    --header-h: 72px;
}

body {
  background: #ffffff;
  color: #338eda;
  padding: 0px;
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  margin: 0;
}

.main_div {
    max-width: 380px;
        margin: 0 auto;
    padding: 30px;
    background: #fefefe; 
    border-radius: 10px;   
    box-shadow: 0 6px 18px rgba(236, 55, 80, 0.3);
    width: min(380px, 92vw);
    text-align: center;
}

.main_div input, .main_div button {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.main_div button, .add-member-btn {
    background: #ec3750;
    color: #ffffff;
    border: none;
    cursor: pointer;
}

.add-member-btn {
  display: inline-flex;
  width: auto;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 10px 16px;
  margin: 0 auto 16px;
  border-radius: 8px;
}

.member-form-page {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--header-h));
  padding: 24px;
}

.member-form-card {
  width: min(420px, 92vw);
  margin: 0;
}

.member-form-card h3 {
  margin-top: 0;
  margin-bottom: 16px;
}

.member-form-page form,
.member-form-page .main_div,
.member-form-page .member-form-card {
  width: min(420px, 92vw);
  margin: 0;
}
.member-form-page form input,
.member-form-page form select,
.member-form-page form button {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  margin-bottom: 12px;
  box-sizing: border-box;
  font-family: inherit;
}
.member-form-page form button {
  background: #ec3750;
  color: #ffffff;
  border: none;
  cursor: pointer;
}
.member-form-page form button:hover {
  background: #ff8c37;
}

.main_div button:hover {
    background: #ff8c37;
    box-shadow: 0 6px 18px rgba(236, 55, 80, 0.45);
}






.loggedin_div {
    max-width: 380px;
    margin: 0 auto;
    padding: 30px;
    background: #fefefe;   
    width: min(380px, 92vw);
    text-align: center;
}

.loggedin_div input, .loggedin_div button {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.loggedin_div button {
    background: #ec3750;
    color: #ffffff;
    border: none;
    cursor: pointer;
}

.loggedin_div button:hover {
    background: #ff8c37;
    box-shadow: 0 6px 18px rgba(236, 55, 80, 0.45);
    color: #ffffff;
}

.page-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-h);
    max-width: 100%;
    margin: 0;
    padding: 8px 15px;
    background: #fefefe;
    border-radius: 0;
    box-shadow: 0 6px 18px rgba(236, 55, 80, 0.45);
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-header h1 {
        margin: 0;
        line-height: 1;
}

.page-shell {
        margin-top: var(--header-h);
        min-height: calc(100vh - var(--header-h));
    display: grid;
    place-items: center;
        overflow: auto;
}

.page-header button {
    background: #ec3750;
    color: #ffffff;
    border: none;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
}

.page-header button:hover {
    background: #ff8c37;
    box-shadow: 0 6px 18px rgba(236, 55, 80, 0.45);
    color: #ffffff;
}

.header-button {
  background: #ec3750;
  color: #ffffff;
  border: none;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
}

.header-button:hover {
  background: #ff8c37;
  box-shadow: 0 6px 18px rgba(236, 55, 80, 0.45);
  color: #ffffff;
}

.dashboard-page .page-header {
  justify-content: space-between;
  padding: 8px 20px;
}

.dashboard-page .page-header h1 {
  animation: titleIn 0.35s ease-out;
}

.dashboard-page .page-header button {
  animation: buttonIn 0.35s ease-out;
}  

@keyframes titleIn {
  from { transform: translateX(24px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes buttonIn {
  from { transform: translateX(24px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.dashboard-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  width: 95%;
  box-sizing: border-box;
  padding: 18px; 
  border: 0px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  background: #ffffff;
  max-width: 1700px;
  margin: 0 auto; 
}
.card {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  cursor: pointer;
  user-select: none;
  padding: 18px;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  background: #ffffff;
  transition: box-shadow 0.12s ease, transform 0.12s ease;
}
.card:focus {
  outline: 3px solid rgba(236,55,80,0.18);
  outline-offset: 2px;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(236,55,80,0.12);
}

.card img {
  width: 100%;
  height: auto;
  display: block;
  flex: 0 0 auto;
}

.card .card-footer {
  padding: 12px;
  margin-top: 12px;
  text-align: center;
}

.card h3 {
  margin:0 0 0.6rem 0;
  font-size:1rem;
  color:#0f172a;
}

.card button {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.card button {
    background: #ec3750;
    color: #ffffff;
    border: none;
    cursor: pointer;
}

.members-list { 
  width:95%; 
  margin:0 auto; 
  max-width:1100px; 
}

.member-card { 
  display:flex; 
  justify-content:space-between; 
  align-items:center;
  height:88px; 
  padding:12px; 
  border-radius:10px; 
  border:1px solid #eee; 
  text-decoration:none; 
  color:inherit; 
}

.member-name { 
  font-weight:700; 
  font-size:1.3rem; 
}

.member-detail h2 {
  font-size:1.6rem;
  margin: 0 0 8px;
}

.member-meta { 
  text-align:right; 
  font-size:0.9rem; 
  color:#666; 
}

.member-shell {
  max-width: 980px;
  margin: 1.5rem auto;
  padding: 1rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(13,23,36,0.06);
  border: 1px solid rgba(13,23,36,0.06);
}

.members-page { display:block !important; }
.members-top { width:100%; max-width:1100px; margin:0 auto 8px; display:flex; justify-content:center; align-items:center; }
.add-member-btn { display:inline-flex !important; margin:0 !important; }
.members-list { width:100%; max-width:1100px; margin:0 auto; padding:0; }

.page-shell.members-page { display:block !important; text-align:center !important; }
.page-shell.members-page .members-list { text-align:left; margin-top:8px; }
.page-shell.members-page .add-member-btn { display:inline-flex !important; margin:0 !important; }
.page-shell.members-page .add-member-btn { margin-top: 20px !important; }

.member-top {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}
.member-avatar {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  background: linear-gradient(135deg,#eef2ff,#fdf2f8);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  color:#334155;
  font-size:28px;
  flex-shrink:0;
  overflow:hidden;
}
.member-meta {
  flex:1;
  min-width:0;
}
.member-name {
  font-size:1.45rem;
  font-weight:700;
  margin:0 0 0.15rem 0;
  color:#0f172a;
}
.member-sub {
  color:#475569;
  font-size:0.95rem;
  margin:0;
}

.member-actions {
  display:flex;
  gap:0.5rem;
}
.btn {
  display:inline-flex;
  align-items:center;
  gap:0.5rem;
  padding:0.45rem 0.8rem;
  border-radius:8px;
  border:1px solid rgba(15,23,42,0.06);
  background:#fff;
  color:#0f172a;
  cursor:pointer;
  font-weight:600;
  text-decoration:none;
}
.btn.primary {
  background:linear-gradient(90deg,#6366f1,#06b6d4);
  color:#fff;
  border:none;
}
.btn.ghost {
  background:transparent;
  border:1px dashed rgba(99,102,241,0.12);
}

.attendance-page {
  display: grid !important;
  place-items: center;
  text-align: center;
}

.attendance-landing-card,
.attendance-card {
  width: min(1100px, 94vw);
  background: #fff;
  border: 1px solid rgba(13,23,36,0.06);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(236,55,80,0.08);
  padding: 24px;
}

.attendance-landing-card {
  display: grid;
  place-items: center;
  gap: 16px;
  min-height: 240px;
}

.attendance-landing-copy h2,
.attendance-heading h2 {
  margin: 0;
  color: #0f172a;
}

.attendance-landing-copy p,
.attendance-heading p {
  margin: 6px 0 0;
  color: #64748b;
}

.attendance-main-btn {
  margin: 0 !important;
  padding: 14px 22px;
  font-size: 1rem;
}

.attendance-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 16px 0;
}

.attendance-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  overflow: hidden;
}

.attendance-table th,
.attendance-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(148,163,184,0.18);
  text-align: left;
}

.attendance-table thead th {
  color: #334155;
  font-size: 0.92rem;
  background: #f8fafc;
}

.attendance-name {
  font-weight: 700;
  color: #0f172a;
}

.attendance-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.28);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  gap: 8px;
  color: #0f172a;
  background: #fff;
}

.attendance-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.attendance-pill.selected {
  box-shadow: 0 8px 18px rgba(2,6,23,0.08);
  transform: translateY(-1px);
}

.attendance-present.selected {
  background: #dcfce7;
  border-color: #22c55e;
  color: #166534;
}

.attendance-absent.selected {
  background: #fee2e2;
  border-color: #ef4444;
  color: #991b1b;
}

.attendance-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.attendance-save-btn {
  background: #ec3750;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 22px;
  font-weight: 700;
  cursor: pointer;
}

.attendance-save-btn:hover {
  background: #ff8c37;
}

@media (max-width: 720px) {
  .attendance-table,
  .attendance-table tbody,
  .attendance-table tr,
  .attendance-table td,
  .attendance-table th {
    display: block;
    width: 100%;
  }

  .attendance-table thead {
    display: none;
  }

  .attendance-table tr {
    border-bottom: 1px solid rgba(148,163,184,0.18);
    padding: 10px 0;
  }

  .attendance-table td {
    border: none;
    padding: 8px 0;
  }

  .attendance-actions {
    justify-content: stretch;
  }

  .attendance-save-btn,
  .attendance-main-btn {
    width: 100%;
  }
}

member-grid > * {
  min-width: 0;
}
  border:1px solid rgba(2,6,23,0.04);
}
.card h3 {
  margin:0 0 0.6rem 0;
  font-size:1rem;
  color:#0f172a;
}

.list {
  display:flex;
  flex-direction:column;
  gap:0.45rem;
}
.list .row {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0.45rem 0.6rem;
  border-radius:8px;
  background:#fff;
  border:1px solid rgba(2,6,23,0.03);
  gap:0.75rem;
  min-width:0;
  overflow-wrap:anywhere;
}


.inline-form {
  display:flex;
  gap:0.5rem;
  align-items:center;
  flex-wrap:wrap;
}
.inline-form input[type="text"], .inline-form input[type="email"], .inline-form select {
  padding:0.4rem 0.6rem;
  border-radius:8px;
  border:1px solid rgba(2,6,23,0.06);
  font-size:0.95rem;
  min-width:0;
}
.inline-form button {
  padding:0.45rem 0.7rem;
  border-radius:8px;
  border:none;
  background:#10b981;
  color:#fff;
  font-weight:600;
  cursor:pointer;
}

@media (max-width:900px){
  .member-grid{grid-template-columns:1fr}
  .member-avatar{width:72px;height:72px;font-size:20px}
  .member-shell{padding:0.75rem}
  .inline-form input[type="text"], .inline-form input[type="email"], .inline-form select, .inline-form button {
    width:100%;
  }
}

.hcb-bar {
  width: calc(100% - 30px);
  margin: 0 5px 1rem;
  box-sizing: border-box;
  background: #ec3750;
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 4px 10px rgba(2,6,23,0.04);
}

.hcb-logo {
  width: 48px;
  height: 48px;
  object-fit: cover;
  flex: 0 0 48px;
  background: #ec3750;
}

.hcb-meta {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  overflow: hidden;
}

.hcb-title {
  font-weight: 700;
  font-size: 1rem;
  color: #ffffff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.hcb-slug {
  font-weight: 400;
  color: #ffffff;
  font-size: 0.9rem;
  margin-left: 0.35rem;
}

.hcb-stats {
  font-size: 0.9rem;
  color: #ffffff;
  overflow-wrap: anywhere;
}

.hcb-actions { 
  flex: 0 0 auto; 
  margin-left:0.5rem; 
}

.hcb-link {
  display: inline-block;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  background: #ec3750;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
}

@media (max-width: 640px) {
  .hcb-bar {
    flex-direction: column;
    alight-items: stretch;
    gap: 0.5rem;
  }

  .hcb-actions { margin-left:0; display:flex; justify-content:flex-end; }
  .hcb-link { width:100%; text-align:center; }
  .hcb-logo { width:56px; height:56px; margin:0 auto 0.25rem auto; }
}

.allergies-page { display:block !important; }
.allergies-top { width:100%; max-width:1100px; margin:0 auto 8px; display:flex; justify-content:center; align-items:center; }
.add-allergy-btn { display:inline-flex !important; margin:0 !important; }
.allergies-list { width:100%; max-width:1100px; margin:0 auto; padding:0; }

.page-shell.allergies-page { display:block !important; text-align:center !important; }
.page-shell.allergies-page .allergies-list { text-align:left; margin-top:8px; }
.page-shell.allergies-page .add-allergy-btn { display:inline-flex !important; margin:0 !important; }
.page-shell.allergies-page .add-allergy-btn { margin-top: 12px !important; }

.allergy-row{display:flex;justify-content:space-between;align-items:center;padding:10px;border-radius:8px;background:#fff;margin-bottom:8px;border:1px solid #eee; margin-top:10px; margin-left: 10px; margin-right: 10px;}
.allergy-left{min-width:0;overflow:hidden}
.badge{padding:4px 8px;border-radius:999px;font-weight:700}
.badge-severe{background:#fee2e2;color:#991b1b}
.badge-moderate{background:#fff4e6;color:#92400e}
.badge-mild{background:#ecfdf5;color:#065f46}
.delete-btn{background:transparent;border:none;color:#ef4444;font-weight:700;cursor:pointer; font-size: 0.9rem;}