:root {
  --bg: #f1f4f9;
  --surface: #fff;
  --text: #072e7b;
  --muted: #445672;
  --success: #1d7a2e;
  --warning: #a15d00;
  --error: #c53030;
  --brand: #003a8f;
  --border: #d2ddf3;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: white;
  padding: 10px 0;
  border-bottom: 3px solid var(--brand);
}

.header-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  width: min(100%, 900px);
  margin: auto;
  gap: 10px;
}

.logo-left,
.logo-right {
  width: clamp(36px, 10vw, 90px);
  height: clamp(36px, 10vw, 90px);
  object-fit: contain;
  flex-shrink: 0;
  max-width: 90px;
}

.header-text {
  flex: 1 1 260px;
  text-align: center;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.top,
.main,
.office,
.address,
.contact {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.top {
  font-family: 'Playfair Display', serif;
  font-size: clamp(8px, 1.5vw, 10px);
  letter-spacing: 1px;
}

.main {
  font-size: clamp(10px, 2.5vw, 12px);
  font-weight: 800;
  color: #1a5e96;
}

.office {
  font-size: clamp(12px, 2.5vw, 16px);
  font-weight: 1000;
  color: var(--brand);
}

.address,
.contact {
  font-size: clamp(9px, 1.8vw, 13px);
  color: #555;
}

.footer {
  margin-top: auto;
  background: var(--brand);
  color: white;
  text-align: center;
  padding: 12px;
  font-size: 12px;
}

.container {
  max-width: 760px;
  margin: 0.75rem auto;
  padding: 0 1rem 1.25rem;
}

.card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.05);
  word-break: break-word;
}

.form-card {
  margin-bottom: 0.75rem;
}

.toggle-group {
  display: flex;
  justify-content: center;
  margin-bottom: .75rem;
  gap: .5rem;
}

.toggle-group button {
  flex: 1;
  padding: .65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--brand);
  font-weight: 600;
  cursor: pointer;
}

.toggle-group button.active {
  background: var(--brand);
  color: #fff;
}

input {
  width: 100%;
  max-width: 360px;
  padding: 14px;
  margin: .3rem 0 .85rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  text-align: center;
  text-transform: uppercase;
}

button#verify-btn {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  display: block;
  appearance: none;
  border: none;
  background: var(--brand);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  padding: 13px 28px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

button#verify-btn:hover {
  background: #00296b;
}

.result-card, .error-card {
  margin-top: 0.75rem;
}

.result-card.available { border-left: 5px solid var(--success); }
.result-card.pending { border-left: 5px solid var(--warning); }
.result-card.not-available { border-left: 5px solid var(--warning); }
.result-card.not-found { border-left: 5px solid var(--border); }
.error-card { border-left: 5px solid var(--error); color: var(--error); }

.notification-header {
  background: #e6f8ea;
  color: #1d7a2e;
  border-radius: 18px;
  padding: 1rem 1.25rem;
  text-align: center;
  font-weight: 900;
  margin-bottom: 1rem;
}

.notification-header h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: 0.025em;
  text-transform: none;
  font-weight: 700;
}

.notification-body {
  background: #e8f3ff;
  border-radius: 18px;
  padding: 1rem 1.2rem;
  color: #102a43;
  text-align: center;
  line-height: 1.3;
}

.notification-location {
  margin: 0 0 0.8rem;
  font-size: 1rem;
  color: #102a43;
}

.notification-location span {
  font-weight: 600;
}

.notification-subtitle {
  margin: 0 0 0.45rem;
  font-weight: 600;
  color: #0f172a;
}

.notification-body ul {
  display: inline-block;
  text-align: left;
  margin: 0;
  padding-left: 1.2rem;
  max-width: 300px;
}

.notification-body li {
  margin: 0.2rem 0;
  font-weight: 400;
}


.notification-detail {
  margin: 0.3rem 0;
  font-size: 0.92rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  white-space: normal;
  word-break: break-word;
}

.notification-label {
  color: #475569;
  font-weight: 600;
}

.notification-value {
  color: #102a43;
  font-weight: 700;
}

.small-note {
  margin-top: 0.6rem;
  font-size: 0.86rem;
  color: #475569;
}

.notfound-banner {
  background: #fdecea;
  color: #c82333;
  border-radius: 10px;
  padding: 1rem 1.1rem;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.info-note {
  margin-top: 12px;
  background: #e7f1ff;
  color: #0b3d91;
  padding: 12px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.info-icon {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #d4e5ff;
  color: #0b3d91;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid rgba(11, 61, 145, 0.15);
}

.info-icon::before {
  content: 'i';
}

.hidden { display: none; }

.search-section {
  text-align: center;
  padding: 0 15px;
}

.search-section h2 {
  color: var(--brand);
  font-size: 20px;
  margin-bottom: 15px;
}

.result-card {
  margin: 20px auto;
  width: 90%;
  max-width: 640px;
  background: white;
  padding: 18px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  display: none;
  animation: fadeIn 0.3s ease;
  overflow: hidden;
}

.result-card:not(.hidden) {
  display: block;
}

.result-card.available { border-left: 8px solid #1d7a2e; }

.available,
.notfound,
.loading {
  padding: 12px;
  border-radius: 6px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}

.available { background: #fff; color: #1e7e34; }
.notfound { background: #fdecea; color: #c82333; }
.loading { background: #fff3cd; color: #856404; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hidden { display: none; }

.search-section{
  text-align: center;
  padding: 0 15px;
}

.search-section h2{
  color: var(--brand);
  font-size: 1.25rem;
  margin-bottom: 15px;
}

.result-card {
  margin: 20px auto;
  width: 95%;
  max-width: 760px;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  display: none;
  animation: fadeIn 0.3s ease;
}

.result-card:not(.hidden){
  display: block;
}

.available,
.notfound,
.loading {
  padding: 12px;
  border-radius: 6px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}

.available{ background:#fff; color:#1e7e34; }
.notfound{ background:#fdecea; color:#c82333; }
.loading{ background:#fff3cd; color:#856404; }

@keyframes fadeIn{
  from{opacity:0; transform:translateY(10px);}
  to{opacity:1; transform:translateY(0);}
}

@media (max-width: 880px) {
  .header-content {
    justify-content: center;
    gap: 8px;
  }

  .logo-left,
  .logo-right {
    width: clamp(34px, 8vw, 70px);
    height: clamp(34px, 8vw, 70px);
  }
}

@media (max-width: 720px) {
  .header {
    padding: 6px 0 8px;
  }

  .header-content {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "logo1 logo2 logo3"
      "text text text";
    gap: 10px 12px;
    align-items: center;
    padding: 0 10px;
  }

  .header-content img:nth-of-type(1) {
    grid-area: logo1;
    justify-self: center;
  }

  .header-content img:nth-of-type(2) {
    grid-area: logo2;
    justify-self: center;
  }

  .header-right,
  .header-content img:nth-of-type(3) {
    grid-area: logo3;
    justify-self: center;
  }

  .header-text {
    grid-area: text;
    width: 100%;
    gap: 0.1rem;
  }

  .top {
    font-size: 0.65rem;
    letter-spacing: 0.5px;
    line-height: 1.1;
  }

  .main,
  .office {
    font-size: 0.88rem;
    line-height: 1.1;
  }

  .address,
  .contact {
    font-size: 0.75rem;
    line-height: 1.1;
  }

  .logo-left,
  .logo-right {
    width: clamp(32px, 11vw, 52px);
    height: clamp(32px, 11vw, 52px);
  }
}

@media (max-width: 600px) {
  html,
  body {
    overflow-x: hidden;
  }

  .container {
    width: 100%;
    margin-top: .8rem;
    padding: 0 .75rem 1rem;
  }

  .header {
    padding: 8px 10px;
  }

  .header-content {
    align-items: center;
  }

  .form-card {
    padding: 1rem;
  }

  .toggle-group {
    flex-direction: column;
    gap: .6rem;
  }

  .toggle-group button,
  input,
  button#verify-btn {
    max-width: 100%;
    width: 100%;
  }

  .toggle-group button {
    min-width: 0;
  }

  input {
    margin-bottom: .9rem;
  }

  .result-card,
  .card {
    width: 100%;
    max-width: 100%;
    margin: 1rem 0;
  }
}
