: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 {
    background: #ec3750;
    color: #ffffff;
    border: none;
    cursor: pointer;
}

.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;
}

.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; /* space between cards and border */
  border: 0px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  background: #ffffff;
  max-width: 1700px;
  margin: 0 auto; /* center the grid container */
}
.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 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 detail page layout */
.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);
}

/* Top row: avatar + title + actions */
.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;
}

/* Action buttons */
.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);
}

/* Two-column content: left details, right panels */
.member-grid {
  display:grid;
  grid-template-columns: 1fr 320px;
  gap:1rem;
  align-items:start;
}

/* Left column: details, projects, allergies */
.card {
  background:#fafafa;
  border-radius:10px;
  padding:0.85rem;
  border:1px solid rgba(2,6,23,0.04);
}
.card h3 {
  margin:0 0 0.6rem 0;
  font-size:1rem;
  color:#0f172a;
}

/* lists */
.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);
}

/* small form elements */
.inline-form {
  display:flex;
  gap:0.5rem;
  align-items:center;
}
.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;
}
.inline-form button {
  padding:0.45rem 0.7rem;
  border-radius:8px;
  border:none;
  background:#10b981;
  color:#fff;
  font-weight:600;
  cursor:pointer;
}

/* Responsive */
@media (max-width:900px){
  .member-grid{grid-template-columns:1fr}
  .member-avatar{width:72px;height:72px;font-size:20px}
  .member-shell{padding:0.75rem}
}