@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap');

:root{
  --bg:#f6f8fb;
  --card:#ffffff;
  --muted:#7b8ea8;
  --brand:#486fa8; /* main button and headings */
  --input-bg:#f3f5f7;
  --line:#e6eaef;
  --radius:12px;
  --shadow: 0 6px 18px rgba(45,63,88,0.06);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:'Inter',system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial;
  background:linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  color:#123;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
}

/* Responsive panel */
.panel {
  width: 100%;
  max-width: 420px;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:8px;
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
  position:relative;
  overflow:hidden;
  padding:28px 36px;
  min-height: 600px; /* Ensure height for vertical centering */
}

/* Mobile first adjustments */
@media (max-width: 480px) {
  body {
    padding: 0;
    background: var(--card);
    align-items: flex-start;
  }
  .panel {
    max-width: 100%;
    height: 100%;
    min-height: 100vh;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 24px;
    justify-content: center;
  }
  .logo {
    top: 24px;
    left: 24px;
  }
}
img {
  display: block;
  max-width: 100%;
  height: auto;
  
}
/* Top logo area */
.logo {
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--brand);
  font-weight:600;
  font-size:14px;
  margin-bottom: 20px;
  /* Absolute positioning to keep logo at top while content centers */
  position: absolute;
  top: 28px;
  left: 36px;
  z-index: 10;
}
.logo .mark{
  width:30px;
  height:30px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:6px;
  color:var(--brand);
}
.logo .mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Content Wrapper for vertical centering */
.content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  margin-top: 120px;
}

/* Center content */
.center {
  margin-top:0;
  margin-bottom: 24px;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align: center;
}

h1 {
  margin:0;
  font-size:34px;
  color:var(--brand);
  font-weight:800;
  letter-spacing:-0.02em;
}
p.lead {
  margin:10px 0 0;
  color:var(--muted);
  font-size:13px;
}

/* Form container sits lower */
.form-wrap{
  margin-top:36px;
  width:100%;
  display:flex;
  flex-direction:column;
  gap:18px;
  align-items:stretch;
}

label.field-label {
  display:block;
  font-size:13px;
  color:#405b78;
  margin-bottom:6px;
  font-weight:600;
}

.input {
  display:flex;
  align-items:center;
  gap:12px;
  background:var(--input-bg);
  border-radius:10px;
  padding:12px 14px;
  border:1px solid transparent;
}

.input:focus-within{
  border-color:rgba(72,111,168,0.14);
  box-shadow:0 6px 18px rgba(72,111,168,0.06);
}

.input svg {flex:0 0 18px; opacity:0.8}

.input input, .input select, .input textarea {
  border:0;
  outline:0;
  background:transparent;
  font-size:14px;
  color:#133;
  width:100%;
  font-family: inherit;
}

.input textarea {
  resize: vertical;
  min-height: 60px;
}

/* Select styling */
.input select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23486fa8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0 center;
  background-size: 16px;
  padding-right: 20px;
}

/* Allergy list styling */
.allergy-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.allergy-item {
  background: #e7f1ff;
  color: var(--brand);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.allergy-item .remove-btn {
  background: none;
  border: none;
  color: var(--brand);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  opacity: 0.6;
}

.allergy-item .remove-btn:hover {
  opacity: 1;
}

.allergy-severity {
  font-size: 11px;
  text-transform: uppercase;
  opacity: 0.8;
  margin-left: 4px;
}

.input-group {
  display: flex;
  gap: 8px;
}

.btn-small {
  padding: 10px 16px;
  font-size: 14px;
  margin-top: 0;
  width: auto;
}

.right-link {
  display:flex;
  justify-content:flex-end;
  margin-top:-6px;
  margin-bottom:6px;
}

.right-link a{
  font-size:13px;
  color:var(--brand);
  text-decoration:none;
  font-weight:600;
}

/* Login button */
.btn {
  margin-top:6px;
  background:var(--brand);
  color:#fff;
  padding:14px 18px;
  border-radius:12px;
  border:0;
  font-weight:700;
  font-size:16px;
  width: 100%;
  cursor:pointer;
  box-shadow: 0 6px 18px rgba(72,111,168,0.18);
  transition:transform .12s ease, box-shadow .12s ease;
}
.btn:active{ transform:translateY(1px) }
.btn:hover{ 
    transform:translateY(-2px) ;
    background: #3b5f8e;
}
.btn:disabled{ opacity:0.6; cursor:not-allowed; transform:none }
.btn:hover:not(:disabled){
  box-shadow: 0 8px 22px rgba(72,111,168,0.22);
}

/* small footer / spacer to match visual */
.spacer {flex:1}

/* password eye button */
.eye-btn {
  background:transparent;
  border:0;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}

.alert {
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 13px;
}
.alert-info {
    background-color: #e7f1ff;
    color: #0c5460;
    border: 1px solid #b8daff;
}
.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
