/* Make padding + border included in width */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  margin: 0;
  display: grid;
  place-items: center;
  min-height: 100vh;
  background: #00507F;
}

.logo {
  display: block;
  max-width: 220px;   /* adjust as needed */
  margin: 0 auto 20px; /* center and add space below */
}

.card {
  background: #fff;
  padding: 28px;
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0,0,0,.07);
  width: min(92vw, 345px);
}

.card-admin {
  background: #fff;
  padding: 28px;
  margin: 40px;
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0,0,0,.07);
  width: min(95vw, 820px);
}

h1 {
  margin: 0 0 12px;
  font-size: 1.25rem;
}

p {
  margin: 0 0 16px;
  color: #444;
}

input[type="tel"],
button {
  display: block;
  width: 100%;
  font-size: 1rem;
}

/* Input */
input[type="tel"] {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #d0d0d5;
}

/* Button */
button {
  margin-top: 12px;
  padding: 12px 14px;
  border: none;
  border-radius: 8px;
  background: #1f6feb;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.note {
  font-size: .9rem;
  color: #666;
  margin-top: 10px;
}

.note-login {
  font-size: .9rem;
  color: #666;
  margin-top: 40px;
  text-align: center;
}

footer {
  margin-top: 14px;
  margin-bottom: 5px;
  font-size: .85rem;
  color: #a2a2a2;
  text-align: center;
}

a {
  color: #1f6feb;
  text-decoration: none;
}

.error {
  background: #fff2f2;
  border: 1px solid #ffd0d0;
  padding: 10px;
  border-radius: 8px;
  color: #a40000;
  margin-top: 12px;
}

.msg {
  background: #eef7ff;
  border: 1px solid #cfe5ff;
  padding: 10px;
  border-radius: 8px;
  color: #003366;
  margin-top: 12px;
}

/* ===== Shared utility ===== */
.container, .wrap { max-width: 1024px; margin: 0 auto; }
.muted { color:#666; font-size:.9rem; }

/* Buttons */
.btn, button {
  padding:10px 14px; border:none; border-radius:8px;
  background:#1f6feb; color:#fff; font-weight:600; cursor:pointer;
  text-decoration:none; display:inline-block;
}
.btn.secondary { background:#555; }
button.danger, .btn.danger { background:#b20000; }

/* Cards & layout */
header.header { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:16px; color:#fff; }
.card { background:#fff; padding:20px; border-radius:12px; box-shadow:0 6px 24px rgba(0,0,0,.07); margin-bottom:18px; }
.row { display:grid; gap:10px; grid-template-columns: 1fr 1fr; }
.row-single { display:block; gap:10px; grid-template-columns: 1fr 1fr; }
@media (max-width: 720px) { .row { grid-template-columns: 1fr; } }

/* Forms */
input[type=text], input[type=url], input[type=password], input[type=file] {
  width:100%; padding:10px; border:1px solid #d0d0d5; border-radius:8px;
}

/* Tables */
table { width:100%; border-collapse: collapse; }
th, td { padding:8px 10px; border-bottom:1px solid #eee; text-align:left; }

/* Notices */
.msg { background:#eef7ff; border:1px solid #cfe5ff; padding:8px; border-radius:8px; margin-bottom:10px; }
.error { background:#fff2f2; border:1px solid #ffd0d0; padding:10px; border-radius:8px; color:#a40000; margin-top:12px; }

/* Admin masthead */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  margin-top: 20px;
}

.masthead-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.masthead-left img.logo {
  max-width: 160px;   /* slightly smaller logo in admin */
  margin: 0;          /* remove auto-centering margin */
}

.masthead-left h2 {
  margin: 0;
  font-size: 1.4rem;
  color: #fff;
  margin-top: 5px;
}

/* Consistent form controls across portal + admin */
input[type=text],
input[type=url],
input[type=password],
input[type=file],
input[type=tel],
select,
textarea,
button {
  display: block;
  width: 100%;
  font-size: 1rem;
}

/* Inputs */
input[type=text],
input[type=url],
input[type=password],
input[type=file],
input[type=tel],
select,
textarea {
  padding: 10px 12px;
  border: 1px solid #d0d0d5;
  border-radius: 8px;
}

/* Buttons */
button,
.btn {
  padding: 12px 14px;
  border: none;
  border-radius: 8px;
  background: #1f6feb;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

/* Variants */
button.danger,
.btn.danger {
  background: #b20000;
}

.btn.secondary {
  background: #555;
}

/* Form groups for consistent spacing */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  color: #333;
}

/* SmartCity-style button for portal */
.btn-primary {
  background: linear-gradient(to bottom, #1c6dd0, #1254a3);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 14px 20px;
  border: none;
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
}

.btn-primary:hover {
  background: linear-gradient(to bottom, #2a7ee2, #1c6dd0);
}

.btn-primary:active {
  transform: translateY(1px);
}
