/* ═══════════════════════════════════════
   layout.css — topbar, nav, page structure
   ═══════════════════════════════════════ */

/* ── Topbar ── */
.topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.topbar-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  flex-shrink: 0;
}

.topbar-center {
  flex: 1;
  text-align: center;
}

.topbar-main {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.topbar-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.topbar-hosp {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-light);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exit-btn {
  height: 34px;
  padding: 0 14px;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: background .12s;
}
.exit-btn:hover { background: var(--bg-subtle); }

/* ── Nav tabs ── */
.nav {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  padding: 0 20px;
  gap: 2px;
}

.nav-btn {
  height: 46px;
  padding: 0 18px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-faint);
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  font-family: var(--font);
  transition: color .15s, border-color .15s;
}

.nav-btn.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.nav-btn:hover:not(.active) { color: var(--text-secondary); }

/* ── Page container ── */
.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* ── Login layout ── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg-page);
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-emblem {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin: 0 auto 14px;
  display: block;
}

.login-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
}

.login-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-card);
}

.login-card-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.login-card-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 22px;
  line-height: 1.5;
}

.login-field {
  margin-bottom: 16px;
}

.login-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.login-field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: var(--font);
  outline: none;
  transition: border-color .15s;
  color: var(--text-primary);
  background: var(--bg-card);
}

.login-field input:focus {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}

.login-note {
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
  margin-top: 14px;
  line-height: 1.6;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .topbar-center .topbar-sub { display: none; }
  .topbar-hosp { max-width: 120px; }
  .login-card { padding: 24px 18px; }
}
