*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f0f4f8;
  color: #1a202c;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
header {
  background: #0c6e78;
  color: #fff;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
}
header .header-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
header .header-left > div { min-width: 0; }
header h1 { font-size: 1.4rem; font-weight: 700; }
header p { font-size: 0.85rem; opacity: 0.8; margin-top: 2px; }

/* ── Burger menu ─────────────────────────────────────────────────────────── */
.burger-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 6px;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  flex-shrink: 0;
}
.burger-btn:hover { background: rgba(255,255,255,0.15); }
.burger-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: rgba(255,255,255,0.85);
  border-radius: 2px;
}

.burger-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 32px;
  background: #0c6e78;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  min-width: 210px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  overflow: hidden;
  display: none;
  z-index: 1000;
}
.burger-menu.open { display: block; }
.burger-menu a {
  display: block;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 13px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background .2s;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.burger-menu a:last-child { border-bottom: none; }
.burger-menu a:hover { background: rgba(255,255,255,0.15); color: #fff; }
.burger-menu a.active { background: rgba(255,255,255,0.12); color: #fff; font-weight: 600; }

/* ── User bar ────────────────────────────────────────────────────────────── */
#userBar {
  background: #075059;
  color: rgba(255,255,255,0.75);
  padding: 5px 32px;
  font-size: 0.78rem;
  text-align: right;
  display: none;
}
#userBar.visible { display: block; }

/* ── Responsive header ───────────────────────────────────────────────────── */
@media (max-width: 600px) {
  header { padding: 12px 16px; flex-wrap: nowrap; gap: 8px; align-items: flex-start; }
  header h1 { font-size: 1.1rem; }
  header p { font-size: 0.78rem; }
  .burger-btn { margin-top: 2px; }
  #userBar { padding: 5px 16px; }
  .burger-menu { right: 16px; }
  main { padding: 0 16px; }
  .btn-row button { padding-left: 12px; padding-right: 12px; }
}

/* ── Main content ────────────────────────────────────────────────────────── */
main {
  width: 100%;
  max-width: 1200px;
  margin: 36px auto;
  padding: 0 32px;
  flex: 1;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer {
  background: #075059;
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 16px 32px;
  font-size: 0.8rem;
}
footer a { color: rgba(255,255,255,0.9); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  padding: 28px 32px;
  margin-bottom: 24px;
}
.card h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #0c6e78;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── Form elements ───────────────────────────────────────────────────────── */
textarea {
  width: 100%;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  line-height: 1.5;
  transition: border-color .2s;
}
textarea:focus { outline: none; border-color: #0c6e78; box-shadow: 0 0 0 3px rgba(12,110,120,.15); }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 5px;
}
.field .hint { font-size: 0.78rem; color: #a0aec0; margin-top: 4px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-row { display: flex; gap: 10px; margin-top: 14px; flex-wrap: nowrap; }
.btn-row button { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

button {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background .2s, opacity .2s;
}
button:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary { background: #0c6e78; color: #fff; }
.btn-primary:hover:not(:disabled) { background: #09535b; }

.btn-secondary { background: #e2e8f0; color: #2d3748; }
.btn-secondary:hover:not(:disabled) { background: #cbd5e0; }

/* ── Loading spinner ─────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Error box ───────────────────────────────────────────────────────────── */
.error-box {
  background: #fff5f5;
  border: 1px solid #feb2b2;
  color: #c53030;
  border-radius: 6px;
  padding: 12px 16px;
  margin-top: 14px;
  font-size: 0.9rem;
  display: none;
}

/* ── Toast notification ──────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  z-index: 10000;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  max-width: 300px;
}
.toast-show { opacity: 1; transform: translateY(0); }
.toast-info    { background: #0c6e78; }
.toast-success { background: #276749; }
.toast-error   { background: #c53030; }

/* Prevent iOS Safari from zooming when tapping inputs (requires font-size >= 16px) */
@media (hover: none) and (pointer: coarse) {
  textarea, input[type="text"], input[type="number"], input[type="password"] {
    font-size: 16px !important;
  }
}
